Filtering-based image coding device and method

ABSTRACT

According to embodiments described herein, sub-pictures and/or virtual boundaries can be used for coding an image. For example, sub-pictures in the current picture can be used for predicting, reconstructing, and/or filtering the current picture. Virtual boundaries can be used for filtering reconstructed samples of the current picture. Through image coding based on the subpictures and/or virtual boundaries according to embodiments described herein, the subjective/objective quality of an image can be improved, and the consumption of hardware resources necessary for the coding can be reduced.

BACKGROUND OF THE DISCLOSURE Field of the Disclosure

The present document relates to a filtering-based image coding apparatusand method.

Related Art

Recently, demand for high-resolution, high-quality image/video such as4K or 8K or higher ultra high definition (UHD) image/video has increasedin various fields. As image/video data has high resolution and highquality, the amount of information or bits to be transmitted increasesrelative to the existing image/video data, and thus, transmitting imagedata using a medium such as an existing wired/wireless broadband line oran existing storage medium or storing image/video data using existingstorage medium increase transmission cost and storage cost.

In addition, interest and demand for immersive media such as virtualreality (VR) and artificial reality (AR) content or holograms hasrecently increased and broadcasting for image/video is havingcharacteristics different from reality images such as game images hasincreased.

Accordingly, a highly efficient image/video compression technology isrequired to effectively compress, transmit, store, and reproduceinformation of a high-resolution, high-quality image/video havingvarious characteristics as described above.

Specifically, an in-loop filtering process is performed to increasesubjective/objective visual quality, and there is discussion on a schemefor increasing signaling efficiency of information for performingin-loop filtering based on virtual boundaries. In addition, there is anongoing review on applying subpictures to improve performance ofprediction and reconstruction in image coding.

SUMMARY

According to an embodiment of the present document, a method and anapparatus for increasing image coding efficiency are provided.

According to an embodiment of the present document, efficient filteringapplication method and apparatus are provided.

According to an embodiment of the present document, a method andapparatus for effectively applying deblocking, sample adaptive offset(SAO), and adaptive loop filtering (ALF) are provided.

According to an embodiment of the present document, in-loop filteringmay be performed based on virtual boundaries.

According to an embodiment of the present document, whether a sequenceparameter set (SPS) includes additional virtual boundaries-relatedinformation (e.g., information on positions and the number of virtualboundaries) is determined based on whether resampling for referencepictures is enabled.

According to an embodiment of the present document, image coding may beperformed based on subpictures.

According to an embodiment of the present document, subpictures used inimage coding may be independently coded.

According to an embodiment of the present document, a picture mayinclude only one subpicture. In addition, the subpicture may beindependently coded.

According to an embodiment of the present document, a picture may begenerated based on a merging process of subpictures. In addition, thesubpictures may be independently coded subpictures.

According to an embodiment of the present document, each of subpicturesused in image coding may be treated as a picture.

According to an embodiment of the present document, an encodingapparatus for performing video/image encoding is provided.

According to one embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded video/imageinformation, generated according to the video/image encoding methoddisclosed in at least one of the embodiments of the present document, isstored.

According to an embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded information orencoded video/image information, causing to perform the video/imagedecoding method disclosed in at least one of the embodiments of thepresent document by the decoding apparatus, is stored.

According to an embodiment of the present document, overall image/videocompression efficiency may be improved.

According to an embodiment of the present document, subjective/objectivevisual quality may be improved through efficient filtering.

According to an embodiment of the present document, the in-loopfiltering process based on the virtual boundaries may be effectivelyperformed, and filtering performance may be improved.

According to an embodiment of the present document, information forin-loop filtering based on the virtual boundaries may be effectivelysignaled.

According to an embodiment of the present document, subpicture-relatedinformation may be effectively signaled. Therefore, subjective/objectiveimage quality may be improved, and there may be a decrease in a hardwareresource consumption required for coding.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically shows an example of a video/image coding system towhich embodiments of the present disclosure may be applied.

FIG. 2 is a view schematically illustrating the configuration of avideo/image encoding apparatus to which embodiments of the presentdisclosure may be applied.

FIG. 3 is a view schematically illustrating the configuration of avideo/image decoding apparatus to which embodiments of the presentdisclosure may be applied.

FIG. 4 exemplarily shows a hierarchical architecture for a codedvideo/image.

FIG. 5 is a flowchart illustrating an encoding method based on filteringin an encoding apparatus.

FIG. 6 is a flowchart illustrating a decoding method based on filteringin a decoding apparatus.

FIG. 7 and FIG. 8 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

FIG. 9 and FIG. 10 schematically show an example of an image/videodecoding method and related components according to an embodiment(s) ofthe present document.

FIG. 11 shows an example of a content streaming system to whichembodiment(s) disclosed in the present document may be applied.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

The present disclosure may be modified in various forms, and specificembodiments thereof will be described and illustrated in the drawings.However, the embodiments are not intended for limiting the disclosure.The terms used in the following description are used to merely describespecific embodiments, but are not intended to limit the disclosure. Anexpression of a singular number includes an expression of the pluralnumber, so long as it is clearly read differently. The terms such as“include” and “have” are intended to indicate that features, numbers,steps, operations, elements, components, or combinations thereof used inthe following description exist and it should be thus understood thatthe possibility of existence or addition of one or more differentfeatures, numbers, steps, operations, elements, components, orcombinations thereof is not excluded.

In addition, each configuration of the drawings described in thisdocument is an independent illustration for explaining functions asfeatures that are different from each other, and does not mean that eachconfiguration is implemented by mutually different hardware or differentsoftware. For example, two or more of the configurations can be combinedto form one configuration, and one configuration can also be dividedinto multiple configurations. Without departing from the gist of thisdocument, embodiments in which configurations are combined and/orseparated are included in the scope of claims.

Hereinafter, examples of the present embodiment will be described indetail with reference to the accompanying drawings. In addition, likereference numerals are used to indicate like elements throughout thedrawings, and the same descriptions on the like elements will beomitted.

This document relates to video/image coding. For example,methods/embodiments disclosed in this document may be related to theversatile video coding (VVC) standard (ITU-T Rec. H.266), thenext-generation video/image coding standard after VVC, or other videocoding related standards (e.g., high efficiency video coding (HEVC)standard (ITU-T Rec. H.265), essential video coding (EVC) standard, AVS2standard, and the like).

This document suggests various embodiments of video/image coding, andthe above embodiments may also be performed in combination with eachother unless otherwise specified.

In this document, a video may refer to a series of images over time. Apicture generally refers to the unit representing one image at aparticular time frame, and a slice/tile refers to the unit constitutinga part of the picture in terms of coding. A slice/tile may include oneor more coding tree units (CTUs). One picture may consist of one or moreslices/tiles. One picture may consist of one or more tile groups. Onetile group may include one or more tiles.

A pixel or a pel may mean a smallest unit constituting one picture (orimage). Also, ‘sample’ may be used as a term corresponding to a pixel. Asample may generally represent a pixel or a value of a pixel, and mayrepresent only a pixel/pixel value of a luma component or only apixel/pixel value of a chroma component.

A unit may represent a basic unit of image processing. The unit mayinclude at least one of a specific region of the picture and informationrelated to the region. One unit may include one luma block and twochroma (ex. cb, cr) blocks. The unit may be used interchangeably withterms such as block or area in some cases. In a general case, an M×Nblock may include samples (or sample arrays) or a set (or array) oftransform coefficients of M columns and N rows. Alternatively, thesample may mean a pixel value in the spatial domain, and when such apixel value is transformed to the frequency domain, it may mean atransform coefficient in the frequency domain.

In this document, the term “/” and “,” should be interpreted to indicate“and/or.” For instance, the expression “A/B” may mean “A and/or B.”Further, “A, B” may mean “A and/or B.” Further, “A/B/C” may mean “atleast one of A, B, and/or C.” Also, “A/B/C” may mean “at least one of A,B, and/or C.”

Further, in the document, the term “or” should be interpreted toindicate “and/or.” For instance, the expression “A or B” may comprise 1)only A, 2) only B, and/or 3) both A and B. In other words, the term “or”in this document should be interpreted to indicate “additionally oralternatively.”

In the present specification, “at least one of A and B” may mean “onlyA”, “only B”, or “both A and B”. Further, in the present specification,the expression “at least one of A or B” or “at least one of A and/or B”may be interpreted the same as “at least one of A and B”.

Further, in the present specification, “at least one of A, B and C” maymean “only A”, “only B”, “only C”, or “any combination of A, B and C”.Further, “at least one of A, B or C” or “at least one of A, B and/or C”may mean “at least one of A, B and C”.

Further, the parentheses used in the present specification may mean “forexample”. Specifically, in the case that “prediction (intra prediction)”is expressed, it may be indicated that “intra prediction” is proposed asan example of “prediction”. In other words, the term “prediction” in thepresent specification is not limited to “intra prediction”, and it maybe indicated that “intra prediction” is proposed as an example of“prediction”. Further, even in the case that “prediction (i.e., intraprediction)” is expressed, it may be indicated that “intra prediction”is proposed as an example of “prediction”.

In the present specification, technical features individually explainedin one drawing may be individually implemented, or may be simultaneouslyimplemented.

FIG. 1 illustrates an example of a video/image coding system to whichthe disclosure of the present document may be applied.

Referring to FIG. 1 , a video/image coding system may include a sourcedevice and a reception device. The source device may transmit encodedvideo/image information or data to the reception device through adigital storage medium or network in the form of a file or streaming.

The source device may include a video source, an encoding apparatus, anda transmitter. The receiving device may include a receiver, a decodingapparatus, and a renderer. The encoding apparatus may be called avideo/image encoding apparatus, and the decoding apparatus may be calleda video/image decoding apparatus. The transmitter may be included in theencoding apparatus. The receiver may be included in the decodingapparatus. The renderer may include a display, and the display may beconfigured as a separate device or an external component.

The video source may acquire video/image through a process of capturing,synthesizing, or generating the video/image. The video source mayinclude a video/image capture device and/or a video/image generatingdevice. The video/image capture device may include, for example, one ormore cameras, video/image archives including previously capturedvideo/images, and the like. The video/image generating device mayinclude, for example, computers, tablets and smartphones, and may(electronically) generate video/images. For example, a virtualvideo/image may be generated through a computer or the like. In thiscase, the video/image capturing process may be replaced by a process ofgenerating related data.

The encoding apparatus may encode input video/image. The encodingapparatus may perform a series of processes such as prediction,transform, and quantization for compaction and coding efficiency. Theencoded data (encoded video/image information) may be output in the formof a bitstream.

The transmitter may transmit the encoded image/image information or dataoutput in the form of a bitstream to the receiver of the receivingdevice through a digital storage medium or a network in the form of afile or streaming. The digital storage medium may include variousstorage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and thelike. The transmitter may include an element for generating a media filethrough a predetermined file format and may include an element fortransmission through a broadcast/communication network. The receiver mayreceive/extract the bitstream and transmit the received bitstream to thedecoding apparatus.

The decoding apparatus may decode the video/image by performing a seriesof processes such as dequantization, inverse transform, and predictioncorresponding to the operation of the encoding apparatus.

The renderer may render the decoded video/image. The renderedvideo/image may be displayed through the display.

FIG. 2 is a diagram schematically illustrating the configuration of avideo/image encoding apparatus to which the disclosure of the presentdocument may be applied. Hereinafter, what is referred to as the videoencoding apparatus may include an image encoding apparatus.

Referring to FIG. 2 , the encoding apparatus 200 may include and beconfigured with an image partitioner 210, a predictor 220, a residualprocessor 230, an entropy encoder 240, an adder 250, a filter 260, and amemory 270. The predictor 220 may include an inter predictor 221 and anintra predictor 222. The residual processor 230 may include atransformer 232, a quantizer 233, a dequantizer 234, and an inversetransformer 235. The residual processor 230 may further include asubtractor 231. The adder 250 may be called a reconstructor orreconstructed block generator. The image partitioner 210, the predictor220, the residual processor 230, the entropy encoder 240, the adder 250,and the filter 260, which have been described above, may be configuredby one or more hardware components (e.g., encoder chipsets orprocessors) according to an embodiment. In addition, the memory 270 mayinclude a decoded picture buffer (DPB), and may also be configured by adigital storage medium. The hardware component may further include thememory 270 as an internal/external component.

The image partitioner 210 may split an input image (or, picture, frame)input to the encoding apparatus 200 into one or more processing units.As an example, the processing unit may be called a coding unit (CU). Inthis case, the coding unit may be recursively split according to aQuad-tree binary-tree ternary-tree (QTBTTT) structure from a coding treeunit (CTU) or the largest coding unit (LCU). For example, one codingunit may be split into a plurality of coding units of a deeper depthbased on a quad-tree structure, a binary-tree structure, and/or aternary-tree structure. In this case, for example, the quad-treestructure is first applied and the binary-tree structure and/or theternary-tree structure may be later applied. Alternatively, thebinary-tree structure may also be first applied. A coding processaccording to the present disclosure may be performed based on a finalcoding unit which is not split any more. In this case, based on codingefficiency according to image characteristics or the like, the maximumcoding unit may be directly used as the final coding unit, or asnecessary, the coding unit may be recursively split into coding units ofa deeper depth, such that a coding unit having an optimal size may beused as the final coding unit. Here, the coding process may include aprocess such as prediction, transform, and reconstruction to bedescribed later. As another example, the processing unit may furtherinclude a prediction unit (PU) or a transform unit (TU). In this case,each of the prediction unit and the transform unit may be split orpartitioned from the aforementioned final coding unit. The predictionunit may be a unit of sample prediction, and the transform unit may be aunit for inducing a transform coefficient and/or a unit for inducing aresidual signal from the transform coefficient.

The unit may be interchangeably used with the term such as a block or anarea in some cases. Generally, an M×N block may represent samplescomposed of M columns and N rows or a group of transform coefficients.The sample may generally represent a pixel or a value of the pixel, andmay also represent only the pixel/pixel value of a luma component, andalso represent only the pixel/pixel value of a chroma component. Thesample may be used as the term corresponding to a pixel or a pelconfiguring one picture (or image).

The subtractor 231 may generate a residual signal (residual block,residual samples, or residual sample array) by subtracting a predictionsignal (predicted block, prediction samples, or prediction sample array)output from the predictor 220 from an input image signal (originalblock, original samples, or original sample array), and the generatedresidual signal is transmitted to the transformer 232. The predictor 220may perform prediction for a processing target block (hereinafter,referred to as a “current block”), and generate a predicted blockincluding prediction samples for the current block. The predictor 220may determine whether intra prediction or inter prediction is applied ona current block or in a CU unit. As described later in the descriptionof each prediction mode, the predictor may generate various kinds ofinformation related to prediction, such as prediction mode information,and transfer the generated information to the entropy encoder 240. Theinformation on the prediction may be encoded in the entropy encoder 240and output in the form of a bitstream.

The intra predictor 222 may predict a current block with reference tosamples within a current picture. The referenced samples may be locatedneighboring to the current block, or may also be located away from thecurrent block according to the prediction mode. The prediction modes inthe intra prediction may include a plurality of non-directional modesand a plurality of directional modes. The non-directional mode mayinclude, for example, a DC mode or a planar mode. The directional modemay include, for example, 33 directional prediction modes or 65directional prediction modes according to the fine degree of theprediction direction. However, this is illustrative and the directionalprediction modes which are more or less than the above number may beused according to the setting. The intra predictor 222 may alsodetermine the prediction mode applied to the current block using theprediction mode applied to the neighboring block.

The inter predictor 221 may induce a predicted block of the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. At this time, in order to decreasethe amount of motion information transmitted in the inter predictionmode, the motion information may be predicted in units of a block, asub-block, or a sample based on the correlation of the motioninformation between the neighboring block and the current block. Themotion information may include a motion vector and a reference pictureindex. The motion information may further include inter predictiondirection (L0 prediction, L1 prediction, Bi prediction, or the like)information. In the case of the inter prediction, the neighboring blockmay include a spatial neighboring block existing within the currentpicture and a temporal neighboring block existing in the referencepicture. The reference picture including the reference block and thereference picture including the temporal neighboring block may also bethe same as each other, and may also be different from each other. Thetemporal neighboring block may be called the name such as a collocatedreference block, a collocated CU (colCU), or the like, and the referencepicture including the temporal neighboring block may also be called acollocated picture (colPic). For example, the inter predictor 221 mayconfigure a motion information candidate list based on the neighboringblocks, and generate information indicating what candidate is used toderive the motion vector and/or the reference picture index of thecurrent block. The inter prediction may be performed based on variousprediction modes, and for example, in the case of a skip mode and amerge mode, the inter predictor 221 may use the motion information ofthe neighboring block as the motion information of the current block. Inthe case of the skip mode, the residual signal may not be transmittedunlike the merge mode. A motion vector prediction (MVP) mode mayindicate the motion vector of the current block by using the motionvector of the neighboring block as a motion vector predictor, andsignaling a motion vector difference.

The predictor 220 may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply both intra prediction and inter prediction.This may be called combined inter and intra prediction (CIIP). Inaddition, the predictor may perform an intra block copy (IBC) forprediction of a block. The intra block copy may be used for contentimage/moving image coding of a game or the like, for example, screencontent coding (SCC). The IBC basically performs prediction in thecurrent picture, but may be performed similarly to inter prediction inthat a reference block is derived in the current picture. That is, theIBC may use at least one of inter prediction techniques described in thepresent document.

The prediction signal generated through the inter predictor 221 and/orthe intra predictor 222 may be used to generate a reconstructed signalor to generate a residual signal. The transformer 232 may generatetransform coefficients by applying a transform technique to the residualsignal. For example, the transform technique may include at least one ofa discrete cosine transform (DCT), a discrete sine transform (DST), agraph-based transform (GBT), or a conditionally non-linear transform(CNT). Here, the GBT means transform obtained from a graph whenrelationship information between pixels is represented by the graph. TheCNT refers to the transform obtained based on a prediction signalgenerated using all previously reconstructed pixels. In addition, thetransform process may be applied to square pixel blocks having the samesize, or may be applied to blocks having a variable size rather than asquare.

The quantizer 233 may quantize the transform coefficients and transmitthem to the entropy encoder 240, and the entropy encoder 240 may encodethe quantized signal (information on the quantized transformcoefficients) and output a bitstream. The information on the quantizedtransform coefficients may be referred to as residual information. Thequantizer 233 may rearrange block type quantized transform coefficientsinto a one-dimensional vector form based on a coefficient scanningorder, and generate information on the quantized transform coefficientsbased on the quantized transform coefficients in the one-dimensionalvector form. The entropy encoder 240 may perform various encodingmethods such as, for example, exponential Golomb, context-adaptivevariable length coding (CAVLC), context-adaptive binary arithmeticcoding (CABAC), and the like. The entropy encoder 240 may encodeinformation necessary for video/image reconstruction together with orseparately from the quantized transform coefficients (e.g., values ofsyntax elements and the like). Encoded information (e.g., encodedvideo/image information) may be transmitted or stored in the unit of anetwork abstraction layer (NAL) in the form of a bitstream. Thevideo/image information may further include information on variousparameter sets, such as an adaptation parameter set (APS), a pictureparameter set (PPS), a sequence parameter set (SPS), or a videoparameter set (VPS). In addition, the video/image information mayfurther include general constraint information. In the present document,information and/or syntax elements being signaled/transmitted to bedescribed later may be encoded through the above-described encodingprocess, and be included in the bitstream. The bitstream may betransmitted through a network, or may be stored in a digital storagemedium. Here, the network may include a broadcasting network and/or acommunication network, and the digital storage medium may includevarious storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, andthe like. A transmitter (not illustrated) transmitting a signal outputfrom the entropy encoder 240 and/or a storage unit (not illustrated)storing the signal may be configured as an internal/external element ofthe encoding apparatus 200, and alternatively, the transmitter may beincluded in the entropy encoder 240.

The quantized transform coefficients output from the quantizer 233 maybe used to generate a prediction signal. For example, the residualsignal (residual block or residual samples) may be reconstructed byapplying dequantization and inverse transform to the quantized transformcoefficients through the dequantizer 234 and the inverse transformer235. The adder 250 adds the reconstructed residual signal to theprediction signal output from the predictor 220 to generate areconstructed signal (reconstructed picture, reconstructed block,reconstructed samples, or reconstructed sample array). If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock. The generated reconstructed signal may be used for intraprediction of a next processing target block in the current picture, andmay be used for inter prediction of a next picture through filtering asdescribed below.

Meanwhile, luma mapping with chroma scaling (LMCS) may be applied duringa picture encoding and/or reconstruction process.

The filter 260 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter260 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 270, specifically, in a DPB of thememory 270. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset (SAO), an adaptive loopfilter, a bilateral filter, and the like. The filter 260 may generatevarious kinds of information related to the filtering, and transfer thegenerated information to the entropy encoder 290 as described later inthe description of each filtering method. The information related to thefiltering may be encoded by the entropy encoder 290 and output in theform of a bitstream.

The modified reconstructed picture transmitted to the memory 270 may beused as a reference picture in the inter predictor 221. When the interprediction is applied through the encoding apparatus, predictionmismatch between the encoding apparatus 200 and the decoding apparatuscan be avoided and encoding efficiency can be improved.

The DPB of the memory 270 may store the modified reconstructed picturefor use as the reference picture in the inter predictor 221. The memory270 may store motion information of a block from which the motioninformation in the current picture is derived (or encoded) and/or motioninformation of blocks in the picture, having already been reconstructed.The stored motion information may be transferred to the inter predictor221 to be utilized as motion information of the spatial neighboringblock or motion information of the temporal neighboring block. Thememory 270 may store reconstructed samples of reconstructed blocks inthe current picture, and may transfer the reconstructed samples to theintra predictor 222.

FIG. 3 is a diagram for schematically explaining the configuration of avideo/image decoding apparatus to which the disclosure of the presentdocument may be applied.

Referring to FIG. 3 , the decoding apparatus 300 may include andconfigured with an entropy decoder 310, a residual processor 320, apredictor 330, an adder 340, a filter 350, and a memory 360. Thepredictor 330 may include an inter predictor 331 and an intra predictor332. The residual processor 320 may include a dequantizer 321 and aninverse transformer 322. The entropy decoder 310, the residual processor320, the predictor 330, the adder 340, and the filter 350, which havebeen described above, may be configured by one or more hardwarecomponents (e.g., decoder chipsets or processors) according to anembodiment. Further, the memory 360 may include a decoded picture buffer(DPB), and may be configured by a digital storage medium. The hardwarecomponent may further include the memory 360 as an internal/externalcomponent.

When the bitstream including the video/image information is input, thedecoding apparatus 300 may reconstruct the image in response to aprocess in which the video/image information is processed in theencoding apparatus illustrated in FIG. 2 . For example, the decodingapparatus 300 may derive the units/blocks based on block split-relatedinformation acquired from the bitstream. The decoding apparatus 300 mayperform decoding using the processing unit applied to the encodingapparatus. Therefore, the processing unit for the decoding may be, forexample, a coding unit, and the coding unit may be split according tothe quad-tree structure, the binary-tree structure, and/or theternary-tree structure from the coding tree unit or the maximum codingunit. One or more transform units may be derived from the coding unit.In addition, the reconstructed image signal decoded and output throughthe decoding apparatus 300 may be reproduced through a reproducingapparatus.

The decoding apparatus 300 may receive a signal output from the encodingapparatus of FIG. 2 in the form of a bitstream, and the received signalmay be decoded through the entropy decoder 310. For example, the entropydecoder 310 may parse the bitstream to derive information (e.g.,video/image information) necessary for image reconstruction (or picturereconstruction). The video/image information may further includeinformation on various parameter sets such as an adaptation parameterset (APS), a picture parameter set (PPS), a sequence parameter set(SPS), or a video parameter set (VPS). In addition, the video/imageinformation may further include general constraint information. Thedecoding apparatus may further decode picture based on the informationon the parameter set and/or the general constraint information.Signaled/received information and/or syntax elements described later inthis document may be decoded may decode the decoding process andobtained from the bitstream. For example, the entropy decoder 310decodes the information in the bitstream based on a coding method suchas exponential Golomb coding, CAVLC, or CABAC, and output syntaxelements required for image reconstruction and quantized values oftransform coefficients for residual. More specifically, the CABACentropy decoding method may receive a bin corresponding to each syntaxelement in the bitstream, determine a context model by using a decodingtarget syntax element information, decoding information of a decodingtarget block or information of a symbol/bin decoded in a previous stage,and perform an arithmetic decoding on the bin by predicting aprobability of occurrence of a bin according to the determined contextmodel, and generate a symbol corresponding to the value of each syntaxelement. In this case, the CABAC entropy decoding method may update thecontext model by using the information of the decoded symbol/bin for acontext model of a next symbol/bin after determining the context model.The information related to the prediction among the information decodedby the entropy decoder 310 may be provided to the predictor 330, andinformation on the residual on which the entropy decoding has beenperformed in the entropy decoder 310, that is, the quantized transformcoefficients and related parameter information, may be input to thedequantizer 321. In addition, information on filtering among informationdecoded by the entropy decoder 310 may be provided to the filter 350.Meanwhile, a receiver (not illustrated) for receiving a signal outputfrom the encoding apparatus may be further configured as aninternal/external element of the decoding apparatus 300, or the receivermay be a constituent element of the entropy decoder 310. Meanwhile, thedecoding apparatus according to the present document may be referred toas a video/image/picture decoding apparatus, and the decoding apparatusmay be classified into an information decoder (video/image/pictureinformation decoder) and a sample decoder (video/image/picture sampledecoder). The information decoder may include the entropy decoder 310,and the sample decoder may include at least one of the dequantizer 321,the inverse transformer 322, the predictor 330, the adder 340, thefilter 350, and the memory 360.

The dequantizer 321 may dequantize the quantized transform coefficientsto output the transform coefficients. The dequantizer 321 may rearrangethe quantized transform coefficients in a two-dimensional block form. Inthis case, the rearrangement may be performed based on a coefficientscan order performed by the encoding apparatus. The dequantizer 321 mayperform dequantization for the quantized transform coefficients using aquantization parameter (e.g., quantization step size information), andacquire the transform coefficients.

The inverse transformer 322 inversely transforms the transformcoefficients to acquire the residual signal (residual block, residualsample array).

The predictor 330 may perform the prediction of the current block, andgenerate a predicted block including the prediction samples of thecurrent block. The predictor may determine whether the intra predictionis applied or the inter prediction is applied to the current block basedon the information about prediction output from the entropy decoder 310,and determine a specific intra/inter prediction mode.

The predictor may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply intra prediction and inter prediction. Thismay be called combined inter and intra prediction (CIIP). In addition,the predictor may perform an intra block copy (IBC) for prediction of ablock. The intra block copy may be used for content image/moving imagecoding of a game or the like, for example, screen content coding (SCC).The IBC basically performs prediction in the current picture, but may beperformed similarly to inter prediction in that a reference block isderived in the current picture. That is, the IBC may use at least one ofinter prediction techniques described in the present document.

The intra predictor 332 may predict the current block by referring tothe samples in the current picture. The referred samples may be locatedin the neighborhood of the current block, or may be located apart fromthe current block according to the prediction mode. In intra prediction,prediction modes may include a plurality of non-directional modes and aplurality of directional modes. The intra predictor 332 may determinethe prediction mode to be applied to the current block by using theprediction mode applied to the neighboring block.

The inter predictor 331 may derive a predicted block for the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. In this case, in order to reducethe amount of motion information being transmitted in the interprediction mode, motion information may be predicted in the unit ofblocks, subblocks, or samples based on correlation of motion informationbetween the neighboring block and the current block. The motioninformation may include a motion vector and a reference picture index.The motion information may further include information on interprediction direction (L0 prediction, L1 prediction, Bi prediction, andthe like). In case of inter prediction, the neighboring block mayinclude a spatial neighboring block existing in the current picture anda temporal neighboring block existing in the reference picture. Forexample, the inter predictor 331 may construct a motion informationcandidate list based on neighboring blocks, and derive a motion vectorof the current block and/or a reference picture index based on thereceived candidate selection information. Inter prediction may beperformed based on various prediction modes, and the information on theprediction may include information indicating a mode of inter predictionfor the current block.

The adder 340 may generate a reconstructed signal (reconstructedpicture, reconstructed block, or reconstructed sample array) by addingthe obtained residual signal to the prediction signal (predicted blockor predicted sample array) output from the predictor 330. If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock.

The adder 340 may be called a reconstructor or a reconstructed blockgenerator. The generated reconstructed signal may be used for the intraprediction of a next block to be processed in the current picture, andas described later, may also be output through filtering or may also beused for the inter prediction of a next picture.

Meanwhile, a luma mapping with chroma scaling (LMCS) may also be appliedin the picture decoding process.

The filter 350 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter350 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 360, specifically, in a DPB of thememory 360. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like.

The (modified) reconstructed picture stored in the DPB of the memory 360may be used as a reference picture in the inter predictor 331. Thememory 360 may store the motion information of the block from which themotion information in the current picture is derived (or decoded) and/orthe motion information of the blocks in the picture having already beenreconstructed. The stored motion information may be transferred to theinter predictor 331 so as to be utilized as the motion information ofthe spatial neighboring block or the motion information of the temporalneighboring block. The memory 360 may store reconstructed samples ofreconstructed blocks in the current picture, and transfer thereconstructed samples to the intra predictor 332.

In the present specification, the embodiments described in the predictor330, the dequantizer 321, the inverse transformer 322, and the filter350 of the decoding apparatus 300 may also be applied in the same manneror corresponding to the predictor 220, the dequantizer 234, the inversetransformer 235, and the filter 260 of the encoding apparatus 200.

Meanwhile, as described above, in performing video coding, prediction isperformed to improve compression efficiency. Through this, a predictedblock including prediction samples for a current block as a block to becoded (i.e., a coding target block) may be generated. Here, thepredicted block includes prediction samples in a spatial domain (orpixel domain). The predicted block is derived in the same manner in anencoding apparatus and a decoding apparatus, and the encoding apparatusmay signal information (residual information) on residual between theoriginal block and the predicted block, rather than an original samplevalue of an original block, to the decoding apparatus, therebyincreasing image coding efficiency. The decoding apparatus may derive aresidual block including residual samples based on the residualinformation, add the residual block and the predicted block to generatereconstructed blocks including reconstructed samples, and generate areconstructed picture including the reconstructed blocks.

The residual information may be generated through a transform andquantization process. For example, the encoding apparatus may derive aresidual block between the original block and the predicted block,perform a transform process on residual samples (residual sample array)included in the residual block to derive transform coefficients, performa quantization process on the transform coefficients to derive quantizedtransform coefficients, and signal related residual information to thedecoding apparatus (through a bit stream). Here, the residualinformation may include value information of the quantized transformcoefficients, location information, a transform technique, a transformkernel, a quantization parameter, and the like. The decoding apparatusmay perform dequantization/inverse transform process based on theresidual information and derive residual samples (or residual blocks).The decoding apparatus may generate a reconstructed picture based on thepredicted block and the residual block. Also, for reference for interprediction of a picture afterward, the encoding apparatus may alsodequantize/inverse-transform the quantized transform coefficients toderive a residual block and generate a reconstructed picture basedthereon.

In this document, at least one of quantization/dequantization and/ortransform/inverse transform may be omitted. When thequantization/dequantization is omitted, the quantized transformcoefficient may be referred to as a transform coefficient. When thetransform/inverse transform is omitted, the transform coefficient may becalled a coefficient or a residual coefficient or may still be calledthe transform coefficient for uniformity of expression.

In this document, the quantized transform coefficient and the transformcoefficient may be referred to as a transform coefficient and a scaledtransform coefficient, respectively. In this case, the residualinformation may include information on transform coefficient(s), and theinformation on the transform coefficient(s) may be signaled throughresidual coding syntax. Transform coefficients may be derived based onthe residual information (or information on the transformcoefficient(s)), and scaled transform coefficients may be derivedthrough inverse transform (scaling) on the transform coefficients.Residual samples may be derived based on inverse transform (transform)of the scaled transform coefficients. This may be applied/expressed inother parts of this document as well.

The predictor of the encoding apparatus/decoding apparatus may deriveprediction samples by performing inter prediction in units of blocks.Inter prediction can be a prediction derived in a manner that isdependent on data elements (e.g. sample values or motion information,etc) of picture(s) other than the current picture. When the interprediction is applied to the current block, based on the reference block(reference sample arrays) specified by the motion vector on thereference picture pointed to by the reference picture index, thepredicted block (prediction sample arrays) for the current block can bederived. In this case, in order to reduce the amount of motioninformation transmitted in the inter prediction mode, the motioninformation of the current block may be predicted in units of blocks,subblocks, or samples based on the correlation between the motioninformation between neighboring blocks and the current block. The motioninformation may include the motion vector and the reference pictureindex. The motion information may further include inter prediction type(L0 prediction, L1 prediction, Bi prediction, etc.) information. Whenthe inter prediction is applied, the neighboring blocks may include aspatial neighboring block existing in the current picture and a temporalneighboring block existing in the reference picture. The referencepicture including the reference block and the reference pictureincluding the temporal neighboring block may be the same or different.The temporal neighboring block may be called a collocated referenceblock, a collocated CU (colCU), etc., and a reference picture includingthe temporally neighboring block may be called a collocated picture(colPic). For example, a motion information candidate list may beconstructed based on neighboring blocks of the current block, and a flagor index information indicating which candidate is selected (used) toderive the motion vector and/or the reference picture index of thecurrent block may be signaled. The inter prediction may be performedbased on various prediction modes. For example, in the skip mode and themerge mode, the motion information of the current block may be the sameas the motion information of a selected neighboring block. In the skipmode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, a motion vector ofa selected neighboring block may be used as a motion vector predictor,and a motion vector difference may be signaled. In this case, the motionvector of the current block may be derived using the sum of the motionvector predictor and the motion vector difference.

The motion information may include L0 motion information and/or L1motion information according to an inter prediction type (L0 prediction,L1 prediction, Bi prediction, etc.). A motion vector in the L0 directionmay be referred to as an L0 motion vector or MVL0, and a motion vectorin the L1 direction may be referred to as an L1 motion vector or MVL1.The prediction based on the L0 motion vector may be called L0prediction, the prediction based on the L1 motion vector may be calledthe L1 prediction, and the prediction based on both the L0 motion vectorand the L1 motion vector may be called a bi-prediction. Here, the L0motion vector may indicate a motion vector associated with the referencepicture list L0 (L0), and the L1 motion vector may indicate a motionvector associated with the reference picture list L1 (L1). The referencepicture list L0 may include pictures that are previous than the currentpicture in output order as reference pictures, and the reference picturelist L1 may include pictures that are subsequent than the currentpicture in output order. The previous pictures may be called forward(reference) pictures, and the subsequent pictures may be called backward(reference) pictures. The reference picture list L0 may further includepictures that are subsequent than the current picture in output order asreference pictures. In this case, the previous pictures may be indexedfirst, and the subsequent pictures may be indexed next in the referencepicture list L0. The reference picture list L1 may further includepictures previous than the current picture in output order as referencepictures. In this case, the subsequent pictures may be indexed first inthe reference picture list 1 and the previous pictures may be indexednext. Here, the output order may correspond to a picture order count(POC) order.

FIG. 4 exemplarily shows a hierarchical structure for a codedimage/video.

Referring to FIG. 4 , the coded image/video is divided into VCL (videocoding layer) that deals with an image/video decoding process anditself, a subsystem that transmits and stores the coded information, anda network abstraction layer (NAL) that exists between the VCL andsubsystems and is responsible for network adaptation functions.

The VCL may generate VCL data including compressed image data (slicedata), or generate parameter sets including a picture parameter set(Picture Parameter Set: PPS), a sequence parameter set (SequenceParameter Set: SPS), a video parameter set (Video Parameter Set: VPS)etc. or a supplemental enhancement information (SEI) messageadditionally necessary for the decoding process of an image.

In the NAL, a NAL unit may be generated by adding header information(NAL unit header) to a raw byte sequence payload (RBSP) generated in theVCL. In this case, the RBSP refers to slice data, parameter sets, SEImessages, etc. generated in the VCL. The NAL unit header may include NALunit type information specified according to RBSP data included in thecorresponding NAL unit.

As shown in the figure, the NAL unit may be divided into a VCL NAL unitand a Non-VCL NAL unit according to the RBSP generated in the VCL. TheVCL NAL unit may mean a NAL unit including information (sliced data)about an image, and the Non-VCL NAL unit may mean a NAL unit containinginformation (parameter set or SEI message) necessary for decoding animage.

The above-described VCL NAL unit and Non-VCL NAL unit may be transmittedthrough a network by attaching header information according to a datastandard of the subsystem. For example, the NAL unit may be transformedinto a data form of a predetermined standard such as H.266/VVC fileformat, Real-time Transport Protocol (RTP), Transport Stream (TS), etc.and transmitted through various networks.

As described above, in the NAL unit, the NAL unit type may be specifiedaccording to the RBSP data structure included in the corresponding NALunit, and information on this NAL unit type may be stored and signaledin the NAL unit header.

For example, the NAL unit may be roughly classified into the VCL NALunit type and the Non-VCL NAL unit type depending on whether the NALunit includes information about the image (slice data). The VCL NAL unittype may be classified according to property and a type of a pictureincluded in the VCL NAL unit, and the Non-VCL NAL unit type may beclassified according to the type of a parameter set.

The following is an example of the NAL unit type specified according tothe type of parameter set included in the Non-VCL NAL unit type.

-   -   APS (Adaptation Parameter Set) NAL unit: Type for NAL unit        including APS    -   DPS (Decoding Parameter Set) NAL unit: Type for NAL unit        including DPS    -   VPS (Video Parameter Set) NAL unit: Type for NAL unit including        VPS    -   SPS (Sequence Parameter Set) NAL unit: Type for NAL unit        including SPS    -   PPS (Picture Parameter Set) NAL unit: Type for NAL unit        including PPS    -   PH (Picture header) NAL unit: Type for NAL unit including PH

The above-described NAL unit types have syntax information for the NALunit type, and the syntax information may be stored and signaled in theNAL unit header. For example, the syntax information may benal_unit_type, and NAL unit types may be specified by a nal_unit_typevalue.

Meanwhile, as described above, one picture may include a plurality ofslices, and one slice may include a slice header and slice data. In thiscase, one picture header may be further added to a plurality of slices(a slice header and a slice data set) in one picture. The picture header(picture header syntax) may include information/parameters commonlyapplicable to the picture. In this document, a slice may be mixed orreplaced with a tile group. Also, in this document, a slice header maybe mixed or replaced with a type group header.

The slice header (slice header syntax or slice header information) mayinclude information/parameters commonly applicable to the slice. The APS(APS syntax) or PPS (PPS syntax) may include information/parameterscommonly applicable to one or more slices or pictures. The SPS (SPSsyntax) may include information/parameters commonly applicable to one ormore sequences. The VPS (VPS syntax) may include information/parameterscommonly applicable to multiple layers. The DPS (DPS syntax) may includeinformation/parameters commonly applicable to the entire video. The DPSmay include information/parameters related to concatenation of a codedvideo sequence (CVS). In this document, high level syntax (HLS) mayinclude at least one of the APS syntax, PPS syntax, SPS syntax, VPSsyntax, DPS syntax, picture header syntax, and slice header syntax.

In this document, the image/video information encoded in the encodingapparatus and signaled in the form of a bitstream to the decodingapparatus may include, as well as picture partitioning-relatedinformation in the picture, intra/inter prediction information, residualinformation, in-loop filtering information, etc. the informationincluded in the slice header, the information included in the pictureheader, the information included in the APS, the information included inthe PPS, the information included in the SPS, the information includedin the VPS, and/or the information included in the DPS. In addition, theimage/video information may further include information of the NAL unitheader.

Meanwhile, in order to compensate for a difference between an originalimage and a reconstructed image due to an error occurring in acompression encoding process such as quantization, an in-loop filteringprocess may be performed on reconstructed samples or reconstructedpictures as described above. As described above, the in-loop filteringmay be performed by the filter of the encoding apparatus and the filterof the decoding apparatus, and a deblocking filter, SAO, and/or adaptiveloop filter (ALF) may be applied. For example, the ALF process may beperformed after the deblocking filtering process and/or the SAO processare completed. However, even in this case, the deblocking filteringprocess and/or the SAO process may be omitted.

Hereinafter, picture reconstruction and filtering will be described indetail. In image/video coding, a reconstructed block may be generatedbased on intra prediction/inter prediction in each block unit, and areconstructed picture including the reconstructed blocks may begenerated. When the current picture/slice is an I picture/slice, blocksincluded in the current picture/slice may be reconstructed based on onlyintra prediction. Meanwhile, when the current picture/slice is a P or Bpicture/slice, blocks included in the current picture/slice may bereconstructed based on intra prediction or inter prediction. In thiscase, intra prediction may be applied to some blocks in the currentpicture/slice, and inter prediction may be applied to the remainingblocks.

The intra prediction may represent a prediction for generatingprediction samples for the current block based on reference samples inthe picture (hereinafter, current picture) to which the current blockbelongs. In case that the intra prediction is applied to the currentblock, neighboring reference samples to be used for the intra predictionof the current block may be derived. The neighboring reference samplesof the current block may include a sample adjacent to a left boundary ofthe current block having a size of nW×nH, total 2×nH samples neighboringthe bottom-left, a sample adjacent to the top boundary of the currentblock, total 2×nW samples neighboring the top-right, and one sampleneighboring the top-left of the current block. Alternatively, theneighboring reference samples of the current block may include topneighboring sample of plural columns and left neighboring sample ofplural rows. Alternatively, the neighboring reference samples of thecurrent block may include total nH samples adjacent to the rightboundary of the current block having a size of nW×nH, total nH samplesadjacent to the right boundary of the current block, total nW samplesadjacent to the bottom boundary of the current block, and one sampleneighboring the bottom-right of the current block.

However, some of the neighboring reference samples of the current blockmay have not yet been decoded or may not be available. In this case, thedecoder may configure the neighboring reference samples to be used forthe prediction through substitution of available samples for theunavailable samples. Alternatively, the neighboring reference samples tobe used for the prediction may be configured through interpolation ofthe available samples.

When neighboring reference samples are derived, there are two cases,that is, a case (i) in which a prediction sample may be derived based onan average or interpolation of neighboring reference samples of acurrent block, and a case (ii) in which the prediction sample may bederived based on a reference sample present in a specific (prediction)direction for the prediction sample among the neighboring referencesamples of the current block. The case (i) may be called anon-directional mode or a non-angular mode, and the case (ii) may becalled a directional mode or an angular mode. In addition, theprediction sample may also be generated through a first neighboringsample and a second neighboring sample located in a direction oppositeto the prediction direction of the intra prediction mode of the currentblock based on the prediction sample of the current block among theneighboring reference samples. The above case may be referred to aslinear interpolation intra prediction (LIP). In addition, chromaprediction samples may be generated based on luma samples by using alinear model. This case may be called an LM mode. In addition, atemporary prediction sample of the current block may be derived based onfiltered neighboring reference samples. At least one reference sample,which is derived according to the intra prediction mode among theexisting neighboring reference samples, that is, unfiltered neighboringreference samples, and the temporary prediction sample may beweighted-summed to derive the prediction sample of the current block.The above case may be called a position dependent intra prediction(PDPC). In addition, a reference sample line having the highestprediction accuracy among the neighboring multiple reference samplelines of the current block may be selected to derive the predictionsample by using the reference sample located in the prediction directionon the corresponding line, and the reference sample line used herein maybe indicated (signaled) to a decoding apparatus, thereby performingintra-prediction encoding. The above case may be called multi-referenceline (MRL) intra prediction or MRL-based intra prediction. In addition,intra prediction may be performed based on the same intra predictionmode by dividing the current block into vertical or horizontalsub-partitions, and neighboring reference samples may be derived andused in units of the sub-partitions. That is, in this case, the intraprediction mode for the current block is equally applied to thesub-partitions, and the intra prediction performance may be improved insome cases by deriving and using the neighboring reference samples inunits of the sub-partitions. Such a prediction method may be calledintra sub-partitions (ISP) or ISP-based intra prediction. Theaforementioned intra prediction methods may be called an intraprediction type distinct to the intra prediction mode in the sections1.2. The intra prediction type may be called in various terms such as anintra prediction technique or an additional intra prediction mode or thelike. For example, the intra prediction type (or additional intraprediction mode or the like) may include at least one of theaforementioned LIP, PDPC, MRL, and ISP. A general intra predictionmethod except for the specific intra prediction type such as LIP, PDPC,MRL, or ISP may be called a normal intra prediction type. The normalintra prediction type may be generally applied when the specific intraprediction type is not applied, and prediction may be performed based onthe aforementioned intra prediction mode. Meanwhile, optionally,post-processing filtering may be performed on the derived predictionsample.

Specifically, the intra prediction process may include an operation ofdetermining an intra prediction mode/type, an operation of deriving aneighboring reference sample, and an operation of deriving a predictionsample based on the intra prediction mode/type. In addition, optionally,a post-processing filtering operation may be performed on the derivedprediction sample.

A modified reconstructed picture may be generated through the in-loopfiltering process, and the modified reconstructed picture may be outputas a decoded picture in the decoding apparatus and may also be stored ina decoded picture buffer or memory of the encoding apparatus/decodingapparatus and used as a reference picture in the inter predictionprocess when the picture is encoded/decoded at a later time. The in-loopfiltering process may include a deblocking filtering process, a sampleadaptive offset (SAO) process, and/or an adaptive loop filter (ALF)process as described above. In this case, one or some of the deblockingfiltering process, SAO process, ALF process, and bi-lateral filterprocess may be sequentially applied, or all of the processes may besequentially applied. For example, the SAO process may be performedafter the deblocking filtering process is applied to the reconstructedpicture. Alternatively, for example, the ALF process may be performedafter the deblocking filtering process is applied to the reconstructedpicture. This may also be equally performed in the encoding apparatus.

The deblocking filtering is a filtering technique which removesdistortion occurring at boundaries between blocks in the reconstructedpicture. The deblocking filtering process may, for example, derive atarget boundary in the reconstructed picture, determine a boundarystrength (bS) for the target boundary, and perform deblocking filteringon the target boundary, based on the bS. The bS may be determined basedon a prediction mode, a motion vector difference, whether referencepictures are identical, whether a non-zero significant coefficientexists, etc., of two blocks adjacent to the target boundary.

The SAO is a method in which an offset difference between thereconstructed picture and the original picture is compensated on asample basis. For example, the SAO may be applied based on a type suchas a band offset, an edge offset, or the like. According to the SAO,samples may be classified into different categories according to eachSAO type, and an offset value may be added to each sample, based on thecategory. Filtering information for the SAO may include information onwhether the SAO is applied, SAO type information, SAO offset valueinformation, or the like. The SAO may be applied to the reconstructedpicture after the deblocking filtering is applied.

The ALF is a technique for filtering the reconstructed picture on asample basis, based on filter coefficients according to a filter shape.The encoding apparatus may determine whether the ALF is applied, an ALFshape, and/or an ALF filtering coefficient or the like by comparing thereconstructed picture and the original picture, and may signal thedetermination result to the decoding apparatus. That is, the filteringinformation for the ALF may include information on whether the ALF isapplied, ALF filter shape information, ALF filtering coefficientinformation, or the like. The ALF may be applied to the reconstructedpicture after the deblocking filtering is applied.

FIG. 5 is a flowchart illustrating an encoding method based on filteringin an encoding apparatus. The method of FIG. 5 may include steps S500 toS530.

In the step S500, the encoding apparatus may generate a reconstructedpicture. The step S500 may be performed based on the aforementionedreconstructed picture (or reconstructed samples) generation process.

In the step S510, the encoding apparatus may determine whether in-loopfiltering is applied (across a virtual boundary) based on in-loopfiltering-related information. Herein, the in-loop filtering may includeat least one of the aforementioned de-blocking filtering, SAO, and ALF.

In the step S520, the encoding apparatus may generate a modifiedreconstructed picture (modified reconstructed samples) based on thedetermination of the step S510. Herein, the modified reconstructedpicture (modified reconstructed samples) may be a filtered reconstructedpicture (filtered reconstructed samples).

In the step S530, the encoding apparatus may encode image/videoinformation including the in-loop filtering-related information, basedon the in-loop filtering process.

FIG. 6 is a flowchart illustrating a decoding method based on filteringin a decoding apparatus. The method of FIG. 6 may include steps S600 toS630.

In the step S600, the decoding apparatus may obtain image/videoinformation including in-loop filtering-related information from abitstream. Herein, the bitstream may be based on encoded image/videoinformation transmitted from the encoding apparatus.

In the step S610, the decoding apparatus may generate a reconstructedpicture. The step S610 may be performed based on the aforementionedreconstructed picture (or reconstructed samples).

In the step S620, the decoding apparatus may determine whether in-loopfiltering is applied (across a virtual boundary) based on the in-loopfiltering-related information. Herein, the in-loop filtering may includeat least one of the aforementioned de-blocking filtering, SAO, and ALF.

In the step S630, the decoding apparatus may generate a modifiedreconstructed picture (modified reconstructed samples) based on thedetermination of the step S620. Herein, the modified reconstructedpicture (modified reconstructed samples) may be a filtered reconstructedpicture (filtered reconstructed samples).

As described above, the in-loop filtering process may be applied to thereconstructed picture. In this case, a virtual boundary may be definedto further improve subjective/objective visual quality of thereconstructed picture, and the in-loop filtering process may be appliedacross the virtual boundary. The virtual boundary may include, forexample, a discontinuous edge such as a 360-degree image, a VR image, abound, a Picture In Picture (PIP), or the like. For example, the virtualboundary may be present at a predetermined location, and a presenceand/or location thereof may be signaled. For example, the virtualboundary may be located at an upper fourth sample line of a CTU row(specifically, for example, above the upper fourth sample of the CTUrow). As another example, information on the present and/or location ofthe virtual boundary may be signaled through HLS. The HLS may includethe SPS, the PPS, the picture header, the slice header, or the like asdescribed above.

Hereinafter, a high-level syntax signaling and semantics will bedescribed according to embodiments of the present disclosure.

An embodiment of the present document may include a method ofcontrolling loop filters. The present method for controlling the loopfilters may be applied to a reconstructed picture. In-loop filters (loopfilters) may be used for decoding of encoded bitstreams. The loopfilters may include the aforementioned deblocking, SAO, and ALF. The SPSmay include flags related to each of the deblocking, SAO, and ALF. Theflags may indicate whether each of tools is available for the coding ofa coded layer video sequence (CLVS) or coded video sequence (CVS)referring to the SPS.

In an example, when the loop filters are enabled for the coding of thepictures in the CVS, the applying of the loop filters may be controllednot to be across specific boundaries. For example, the loop filters maybe controlled not to be across subpicture boundaries, the loop-filtersmay be controlled not to be across tile boundaries, the loop-filters maybe controlled not to be across slice boundaries, and/or the loop filtersmay be controlled not to be across virtual boundaries.

In-loop filtering-related information may include information, syntax,syntax elements, and/or semantics described in the present document (orembodiments included therein). The in-loop filtering-related informationmay include information related to whether (the entirety or part of) anin-loop filtering process is enabled across specific boundaries (e.g., avirtual boundary, a subpicture boundary, a slice boundary, and/or a tileboundary). Image information included in a bitstream may include a highlevel syntax (HLS), and the HLS may include the in-loopfiltering-related information. Modified (or filtered) reconstructedsamples (reconstructed pictures) may be generated based on thedetermination on whether the in-loop filtering process is applied acrossthe specific boundaries. In an example, when the in-loop filteringprocess is disabled for all blocks/boundaries, the modifiedreconstructed samples may be identical to the reconstructed samples. Inanother example, the modified reconstructed samples may include modifiedreconstructed samples derived based on the in-loop filtering. However,in this case, some of the reconstructed samples (e.g., reconstructedsamples across virtual boundaries) may not be in-loop filtered based onthe aforementioned determination. For example, reconstructed samplesacross a specific boundary (at least one of a virtual boundary,subpicture boundary, slice boundary, and/or tile boundary for whichin-loop filtering is enabled) may be in-loop filtered, but reconstructedsamples across other boundaries (e.g., a virtual boundary, subpictureboundary, slice boundary, and/or tile boundary for which in-loopfiltering is disabled) may not be in-loop filtered.

In an example, regarding whether the in-loop filtering process isperformed across the virtual boundary, the in-loop filtering-relatedinformation may include an SPS virtual boundaries present flag, apicture header virtual boundaries present flag, information the numberof virtual boundaries, information on positions of virtual boundaries,or the like.

In embodiments included in the present document, the information on thevirtual boundaries position may include information on an x-coordinateof a vertical virtual boundary and/or information on a y-coordinate of ahorizontal virtual boundary. Specifically, the information on thevirtual boundaries position may include the information on thex-coordinate of the vertical virtual boundary and/or the information onthe y-axis of the horizontal virtual boundary in units of luma samples.In addition, the information on the virtual boundaries position mayinclude information on the number of pieces of information (syntaxelements) on the x-coordinate of the vertical virtual boundary which ispresent in the SPS. In addition, the information on the virtualboundaries position may include information on the number of pieces ofinformation (syntax elements) on the y-coordinate of the horizontalvirtual boundary which is present in the SPS. Alternatively, theinformation on the virtual boundaries position may include informationon the number of pieces of information (syntax elements) on thex-coordinate of the vertical virtual boundary which is present in apicture header. In addition, the information on the virtual boundariesposition may include information on the number of pieces of information(syntax elements) on the y-coordinate of the horizontal virtual boundarywhich is present in the picture header.

The following tables show an exemplary syntax and semantics of an SPSaccording to the present embodiment.

TABLE 1 Descriptor seq_parameter_set_rbsp( ) {  ... subpics_present_flag u(1)  if( subpic_present_flag ) {  sps_num_subpics_minus1 u(8)   for( i = 0; i <= sps_num_  subpics_minus1; i++ ) {    subpic_ctu_top_left_x[ i ] u(v)   subpic_ctu_top_left_y[ i ] u(v)    subpic_width_minus1[ i ] u(v)   subpic_height_minus1[ i ] u(v)    subpic_treated_as_pic_flag[ i ]u(1)    loop_filter_across_subpic_ u(1)    enabled_flag[ i ]   }  }  ... sps_sao_enabled_flag u(1)  sps_alf_enabled_flag u(1)  ... sps_loop_filter_across_virtual_ u(1)  boundaries_disabled_present_flag if( sps_loop_filter_across_virtual_  boundaries_disabled_present_flag ){   sps_num_ver_virtual_boundaries u(2)   for( i = 0; i < sps_num_ver_  virtual_boundaries; i++ )    sps_virtual_boundaries_pos_x[ i ] u(13)  sps_num_hor_virtual_boundaries u(2)   for( i = 0; i < sps_num_hor_  virtual_boundaries; i++ )    sps_virtual_boundaries_pos_y[ i ] u(13) }  ... }

TABLE 2 subpics_present_flag equal to 1 specifies that subpictureparameters are present in in the SPS RBSP syntax. subpics_present_flagequal to 0 specifies that subpicture parameters are not present in theSPS RBSP syntax. sps_num_subpics_minus1 plus 1 specifies the number ofsubpictures. sps_num_subpics_minus1 shall be in the range of 0 to 254.When not present, the value of sps_num_subpics_minus1 is inferred to beequal to 0. subpic_ctu_top_left_x[ i ] specifies horizontal position oftop left CTU of i-th subpicture in unit of CtbSizeY. The length of thesyntax element is Ceil( Log2( pic_width_max_in_luma_samples / CtbSizeY )) bits. When not present, the value of subpic_ctu_top_left_x[ i ] isinferred to be equal to 0. subpic_ctu_top_left_y[ i ] specifies verticalposition of top left CTU of i-th subpicture in unit of CtbSizeY. Thelength of the syntax element is Ceil( Log2(pic_height_max_in_luma_samples / CtbSizeY ) ) bits. When not present,the value of subpic_ctu_top_left_y[ i ] is inferred to be equal to 0.subpic_width_minus1[ i ] plus 1 specifies the width of the i-thsubpicture in units of CtbSizeY. The length of the syntax element isCeil( Log2( pic_width_max_in_luma_samples / CtbSizeY ) ) bits. When notpresent, the value of subpic_width_minus1[ i ] is inferred to be equalto Ceil( pic_width_max_in_luma_samples / CtbSizeY ) − 1.subpic_height_minus1[ i ] plus 1 specifies the height of the i-thsubpicture in units of CtbSizeY. The length of the syntax element isCeil( Log2( pic_height_max_in_luma_samples / CtbSizeY ) ) bits. When notpresent, the value of subpic_height_minus1[ i ] is inferred to be equalto Ceil( pic_height_max_in_luma_samples / CtbSizeY ) − 1.subpic_treated_as_pic_flag[ i ] equal to 1 specifies that the i-thsubpicture of each coded picture in the CLVS is treated as a picture inthe decoding process excluding in-loop filtering operations.subpic_treated_as_pic_flag[ i ] equal to 0 specifies that the i-thsubpicture of each coded picture in the CLVS is not treated as a picturein the decoding process excluding in-loop filtering operations. When notpresent, the value of subpic_treated_as_pic_flag[ i ] is inferred to beequal to 0. loop_filter_across_subpic_enabled_flag[ i ] equal to 1specifies that in-loop filtering operations may be performed across theboundaries of the i-th subpicture in each coded picture in the CLVS.loop_filter_across_subpic_enabled_flag[ i ] equal to 0 specifies thatin-loop filtering operations are not performed across the boundaries ofthe i-th subpicture in each coded picture in the CLVS. When not present,the value of loop_filter_across_subpic_enabled_pic_flag[ i ] is inferredto be equal to 1.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to1 specifies that the in-loop filtering operations are disabled acrossthe virtual boundaries in pictures referring to the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures referring to the SPS. In-loop filtering operationsinclude the deblocking filter, sample adaptive offset filter, andadaptive loop filter operations. sps_sao_enabled_flag equal to 1specifies that the sample adaptive offset process is applied to thereconstructed picture after the deblocking filter process.sps_sao_enabled_flag equal to 0 specifies that the sample adaptiveoffset process is not applied to the reconstructed picture after thedeblocking filter process. sps_alf_enabled_flag equal to 0 specifiesthat the adaptive loop filter is disabled. sps_alf_enabled_flag equal to1 specifies that the adaptive loop filter is enabled.sps_num_ver_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_x[ i ] syntax elements that are present inthe SPS. When sps_num_ver_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.The value of sps_virtual_boundaries_pos_x[ i ] shall be in the range of1 to Ceil( pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.sps_num_hor_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_y[ i ] syntax elements that are present inthe SPS. When sps_num_hor_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_y[ i ] is used tocompute the value of VirtualBoundariesPosY[ i ], which specifies thelocation of the i-th horizontal virtual boundary in units of lumasamples. The value of sps_virtual_boundaries_pos_y[ i ] shall be in therange of 1 to Ceil( pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.

The following tables show an exemplary syntax and semantics of a pictureparameter set (PPS) according to the present embodiment.

TABLE 3 Descriptor pic_parameter_set_rbsp( ) {  ... no_pic_partition_flag u(1)  if( !no_pic_partition_flag ) {   ...  loop_filter_across_tiles_enabled_flag u(1)  loop_filter_across_slices_enabled_flag u(1)  }  ... deblocking_filter_control_present_flag u(1)  if( deblocking_filter_ control_present_flag ) {   deblocking_filter_override_enabled_flag u(1)  pps_deblocking_filter_disabled_flag u(1)   if( !pps_deblocking_  filter_disabled_flag ) {    pps_beta_offset_div2 se(v)   pps_tc_offset_div2 se(v)   }  }  ... }

TABLE 4 no_pic_partition_flag equal to 1 specifies that no picturepartitioning applied to each picture referring to the PPS.no_pic_partition_flag equal to 0 specifies each picture referring to thePPS may be partitioned into more than one tile or slice.loop_filter_across_tiles_enabled_flag equal to 1 specifies that in-loopfiltering operations may be performed across tile boundaries in picturesreferring to the PPS. loop_filter_across_tiles_enabled_flag equal to 0specifics that in-loop filtering operations are not performed acrosstile boundaries in pictures referring to the PPS. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations.loop_filter_across_slices_enabled_flag equal to 1 specifies that in-loopfiltering operations may be performed across slice boundaries inpictures referring to the PPS. loop_filter_across_slice_enabled_flagequal to 0 specifies that in-loop filtering operations are not performedacross slice boundaries in pictures referring to the PPS. The in-loopfiltering operations include the deblocking filter, sample adaptiveoffset filter, and adaptive loop filter operations.deblocking_filter_control_present_flag equal to 1 specifies the presenceof deblocking filter control syntax elements in the PPS.deblocking_filter_control_present_flag equal to 0 specifies the absenceof deblocking filter control syntax elements in the PPS.deblocking_filter_override_enabled_flag equal to 1 specifies thepresence of pic_deblocking_filter_override_flag in the PHs referring tothe PPS or slice_deblocking_filter_override_flag in the slice headersreferring to the PPS. deblocking_filter_override_enabled_flag equal to 0specifies the absence of pic_deblocking_filter_override_flag in PHsreferring to the PPS or slice_deblocking_filter_override_flag in sliceheaders referring to the PPS. When not present, the value ofdeblocking_filter_override_enabled_flag is inferred to be equal to 0.pps_deblocking_filter_disabled_flag equal to 1 specifies that theoperation of deblocking filter is not applied for slices referring tothe PPS in which slice_deblocking_filter_disabled_flag is not present.pps_deblocking_filter_disabled_flag equal to 0 specifies that theoperation of the deblocking filter is applied for slices referring tothe PPS in which slice_deblocking_filter_disabled_flag is not present.When not present, the value of pps_deblocking_filter_disabled_flag isinferred to be equal to 0. pps_beta_offset_div2 and pps_tc_offset_div2specify the default deblocking parameter offsets for β and tC (dividedby 2) that are applied for slices referring to the PPS, unless thedefault deblocking parameter offsets are overridden by the deblockingparameter offsets present in the slice headers of the slices referringto the PPS. The values of pps_beta_offset_div2 and pps_tc_offset_div2shall both be in the range of −6 to 6, inclusive. When not present, thevalue of pps_beta_offset_div2 and pps_tc_offset_div2 are inferred to beequal to 0.

The following tables show an exemplary syntax and semantics of a pictureheader according to the present embodiment.

TABLE 5 Descriptor picture_header_rbsp( ) {  ...  if(!sps_loop_filter_across_virtual_  boundaries_disabled_present_flag ) {  ph_loop_filter_across_virtual_ u(1)   boundaries_disabled_present_flag  if( ph_loop_filter_across_virtual_   boundaries_disabled_present_flag) {    ph_num_ver_virtual_boundaries u(2)    for( i = 0; i < ph_num_ver_   virtual_boundaries; i++ )     ph_virtual_boundaries_pos_x[ i ] u(13)   ph_num_hor_virtual_boundaries u(2)    for( i = 0; i < ph_num_hor_   virtual_boundaries; i++ )     ph_virtual_boundaries_pos_y[ i ] u(13)  }  }  ...  if( sps_sao_enabled_flag ) {   pic_sao_enabled_present_flagu(1)   if( pic_sao_enabled_present_flag ) {    pic_sao_luma_enabled_flagu(1)    if(ChromaArrayType != 0 )     pic_sao_chroma_enabled_flag u(1)  }  }  if( sps_alf_enabled_flag ) {   pic_alf_enabled_present_flag u(1)  if( pic_alf_enabled_present_flag ) {    pic_alf_enabled_flag u(1)   if( pic_alf_enabled_flag ) {     pic_num_alf_aps_ids_luma u(3)    for( i = 0; i < pic_num_     alf_aps_ids_luma; i++ )     pic_alf_aps_id_luma[ i ] u(3)     if( ChromaArrayType != 0 )     pic_alf_chroma_idc u(2)     if( pic_alf_chroma_idc )     pic_alf_aps_id_chroma u(3)    }   }  }  ...  if( deblocking_filter_ override_enabled_flag ) {   pic_deblocking_filter_ u(1)  override_present_flag   if( pic_deblocking_filter_  override_present_flag ) {    pic_deblocking_filter_ u(1)   override_flag    if( pic_deblocking_filter_    override_flag ) {    pic_deblocking_ u(1)     filter_disabled_flag     if(!pic_deblocking_     filter_disabled_flag ) {      pic_beta_offset_div2se(v)      pic_tc_offset_div2 se(v)     }    }   }  }  ... }

TABLE 6 ph_loop_filter_across_virtual_boundaries_disabled_present_flagequal to 1 specifies that the in-loop filtering operations are disabledacross the virtual boundaries in pictures associated to the PH.ph_loop_filter_across_virtual_boundaries_disable_(——)present_flag equalto 0 specifies that no such disabling of in-loop filtering operations isapplied in pictures associated to the PH. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. ph_num_ver_virtual_boundariesspecifies the number of ph_virtual_boundaries_pos_x[ i ] syntax elementsthat are present in the PH. ph_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.The value of ph_virtual_boundaries_pos_x[ i ] shall be in the range of 1to Ceil( pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.ph_num_hor_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_y[ i ] syntax elements that are present in thePH. ph_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples. The value ofph_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.pic_sao_enabled_present_flag equal to 1 specifies that pic_sao_luma_flagand pic_sao_chroma_flag are present in the PH.pic_sao_enabled_present_flag equal to 0 specifies that pic_sao_luma_flagand pic_sao_chroma_flag are not present in the PH. Whenpic_sao_enabled_present_flag is not present, it is inferred to be equalto 0. pic_sao_luma_enabled_flag equal to 1 specifies that SAO is enabledfor the luma component in all slices associated with the PH;pic_sao_luma_enabled_flag equal to 0 specifies that SAO for the lumacomponent may be disabled for one, or more, or all slices associatedwith the PH. pic_sao_chroma_enabled_flag equal to 1 specifies that SAOis enabled for the chroma component in all slices associated with thePH; pic_sao_chroma_enabled_flag equal to 0 specifies that SAO for chromacomponent may be disabled for one, or more, or all slices associatedwith the PH. pic_alf_enabled_present_flag equal to 1 specifies thatpic_alf_enabled_flag, pic_num_alf_aps_ids_luma, pic_alf_aps_id_luma[ i], pic_alf_chroma_idc, and pic_alf_aps_id_chroma are present in the PH.pic_alf_enabled_present_flag equal to 0 specifies thatpic_alf_enabled_flag, pic_num_alf_aps_ids_luma, pic_alf_aps_id_luma[ i], pic_alf_chroma_idc, and pic_alf_aps_id_chroma are not present in thePH. When pic_alf_enabled_present_flag is not present, it is inferred tobe equal to 0. pic_alf_enabled_flag equal to 1 specifies that adaptiveloop filter is enabled for all slices associated with the PH and may beapplied to Y, Cb, or Cr colour component in the slices.pic_alf_enabled_flag equal to 0 specifies that adaptive loop filter maybe disabled for one, or more, or all slices associated with the PH. Whennot present, pic_alf_enabled_flag is inferred to be equal to 0.pic_num_alf_aps_ids_luma specifies the number of ALF APSs that theslices associated with the PH refers to. pic_alf_aps_id_luma[ i ]specifies the adaptation_parameter_set_id of the i-th ALF APS that theluma component of the slices associated with the PH refers to. The valueof alf_luma_filter_signal_flag of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto pic_alf_aps_id_luma[ i ] shall be equal to 1. pic_alf_chroma_idcequal to 0 specifies that the adaptive loop filter is not applied to Cband Cr colour components. pic_alf_chroma_idc equal to 1 indicates thatthe adaptive loop filter is applied to the Cb colour component.pic_alf_chroma_idc equal to 2 indicates that the adaptive loop filter isapplied to the Cr colour component. pic_alf_chroma_idc equal to 3indicates that the adaptive loop filter is applied to Cb and Cr colourcomponents. When pic_alf_chroma_idc is not present, it is inferred to beequal to 0. pic_alf_aps_id_chroma specifies theadaptation_parameter_set_id of the ALF APS that the chroma component ofthe slices associated with the PH refers to.pic_deblocking_filter_override_present_flag equal to 1 specifics thatpic_deblocking_filter_override_flag is present in the PH.pic_deblocking_filter_override_present_flag equal to 0 specifies thatpic_deblocking_filter_override_flag is not present in the PH. Whenpic_deblocking_filter_override_present_flag is not present, it isinferred to be equal to 0. pic_deblocking_filter_override_flag equal to1 specifies that deblocking parameters are present in the PH.pic_deblocking_filter_override_flag equal to 0 specifies that deblockingparameters are not present in the PH. When not present, the value ofpic_pic_deblocking_filter_override_flag is inferred to be equal to 0.pic_deblocking_filter_disabled_flag equal to 1 specifies that theoperation of the deblocking filter is not applied for the slicesassociated with the PH. pic_deblocking_filter_disabled_flag equal to 0specifies that the operation of the deblocking filter is applied for theslices associated with the PH. When pic_deblocking_filter_disabled_flagis not present, it is inferred to be equal topps_deblocking_filter_disabled_flag. pic_beta_offset_div2 andpic_tc_offset_div2 specify the deblocking parameter offsets for β and tC(divided by 2) for the slices associated with the PH. The values ofpic_beta_offset_div2 and pic_tc_offset_div2 shall both be in the rangeof −6 to 6, inclusive. When not present, the values ofpic_beta_offset_div2 and pic_tc_offset_div2 are inferred to be equal topps_beta_offset_div2 and pps_tc_offset_div2, respectively.

The following tables show an exemplary syntax and semantics of a sliceheader according to the present embodiment.

TABLE 7 Descriptor slice_header( ) {  ...  if( pps_cu_chroma_qp_ offset_list_enabled_flag )   cu_chroma_qp_offset_enabled_flag u(1)  if(sps_sao_enabled_flag &&  !pic_sao_enabled_present_flag ) {  slice_sao_luma_flag u(1)   if( ChromaArrayType != 0 )   slice_sao_chroma_flag u(1)  }  if( sps_alf_enabled_flag && !pic_alf_enabled_present_flag ) {   slice_alf_enabled_flag u(1)   if(slice_alf_enabled_flag ) {    slice_num_alf_aps_ids_luma u(3)    for( i= 0; i < slice_num_    alf_aps_ids_luma; i++ )    slice_alf_aps_id_luma[ i ] u(3)    if( ChromaArrayType != 0 )    slice_alf_chroma_idc u(2)    if( slice_alf_chroma_idc )    slice_alf_aps_id_chroma u(3)   }  }  if( deblocking_filter_ override_enabled_flag &&      !pic_deblocking_filter_     override_present_flag )   slice_deblocking_filter_override_flagu(1)  if( slice_deblocking_filter_  override_flag ) {  slice_deblocking_filter_disabled_flag u(1)   if( !slice_deblocking_  filter_disabled_flag ) {   slice_beta_offset_div2 se(v)  slice_tc_offset_div2 se(v)   }  }  ... }

TABLE 8 cu_chroma_qp_offset_enabled_flag equal to 1 specifies that thecu_chroma_qp_offset_flag may be present in the transform unit andpalette coding syntax. cu_chroma_qp_offset_enabled_flag equal to 0specifies that the cu_chroma_qp_offset_flag is not present in thetransform unit or palette coding syntax. When not present, the value ofcu_chroma_qp_offset_enabled_flag is inferred to be equal to 0.slice_sao_luma_flag equal to 1 specifies that SAO is enabled for theluma component in the current slice; slice_sao_luma_flag equal to 0specifies that SAO is disabled for the luma component in the currentslice. When slice_sao_luma_flag is not present, it is inferred to beequal to pic_sao_luma_enabled_flag. slice_sao_chroma_flag equal to 1specifies that SAO is enabled for the chroma component in the currentslice; slice_sao_chroma_flag equal to 0 specifies that SAO is disabledfor the chroma component in the current slice. Whenslice_sao_chroma_flag is not present, it is inferred to be equal topic_sao_chroma_enabled_flag. slice_alf_enabled_flag equal to 1 specifiesthat adaptive loop filter is enabled and may be applied to Y, Cb, or Crcolour component in a slice. slice_alf_enabled_flag equal to 0 specifiesthat adaptive loop filter is disabled for all colour components in aslice. When not present, the value of slice_alf_enabled_flag is inferredto be equal to pic_alf_enabled_flag. slice_num_alf_aps_ids_lumaspecifies the number of ALF APSs that the slice refers to. Whenslice_alf_enabled_flag is equal to 1 and slice_num_alf_aps_ids_luma isnot present, the value of slice_num_alf_aps_ids_luma is interred to beequal to the value of pic_num_alf_aps_ids_luma. slice_alf_aps_id_luma[ i] specifies the adaptation_parameter_set_id of the i-th ALF APS that theluma component of the slice refers to. The TemporalId of the APS NALunit having aps_params_type equal to ALF_APS andadaptation_parameter_set_id equal to slice_alf_aps_id_luma[ i ] shall beless than or equal to the TemporalId of the coded slice NAL unit. Whenslice_alf_enabled_flag is equal to 1 and slice_alf_aps_id_luma[ i ] isnot present, the value of slice_alf_aps_id_luma[ i ] is inferred to beequal to the value of pic_alf_aps_id_luma[ i ]. The value ofalf_luma_filter_signal_flag of the APS NAL unit having aps_params_typeequal to ALF_APS and adaptation_parameter_set_id equal toslice_alf_aps_id_luma[ i ] shall be equal to 1. slice_alf_chroma_idcequal to 0 specifies that the adaptive loop filter is not applied to Cband Cr colour components. slice_alf_chroma_idc equal to 1 indicates thatthe adaptive loop filter is applied to the Cb colour component.slice_alf_chroma_idc equal to 2 indicates that the adaptive loop filteris applied to the Cr colour component. slice_alf_chroma_idc equal to 3indicates that the adaptive loop filter is applied to Cb and Cr colourcomponents. When slice_alf_chroma_idc is not present, it is inferred tobe equal to pic_alf_chroma_idc. slice_alf_aps_id_chroma specifies theadaptation_parameter_set_id of the ALF APS that the chroma component ofthe slice refers to. The TemporalId of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto slice_alf_aps_id_chroma shall be less than or equal to the TemporalIdof the coded slice NAL unit. When slice_alf_enabled_flag is equal to 1and slice_alf_aps_id_chroma is not present, the value ofslice_alf_aps_id_chroma is inferred to be equal to the value ofpic_alf_aps_id_chroma. The value of alf_chroma_filter_signal_flag of theAPS NAL unit having aps_params_type equal to ALF_APS andadaptation_parameter_set_id equal to slice_alf_aps_id_chroma shall beequal to 1. slice_deblocking_filter_override_flag equal to 1 specifiesthat deblocking parameters are present in the slice header.slice_deblocking_filter_override_flag equal to 0 specifies thatdeblocking parameters are not present in the slice header. When notpresent, the value of slice_deblocking_filter_override_flag is inferredto be equal to pic_deblocking_filter_override_flag.slice_deblocking_filter_disabled_flag equal to 1 specifies that theoperation of the deblocking filter is not applied for the current slice.slice_deblocking_filter_disabled_flag equal to 0 specifies that theoperation of the deblocking filter is applied for the current slice.When slice_deblocking_filter_disabled_flag is not present, it isinterred to be equal to pic_deblocking_filter_disabled_flag.slice_beta_offset_div2 and slice_tc_offset_div2 specify the deblockingparameter offsets for β and tC (divided by 2) for the current slice. Thevalues of slice_beta_offset div2 and slice_tc_offset_div2 shall both bein the range of −6 to 6, inclusive. When not present, the values ofslice_beta_offset_div2 and slice_tc_offset_div2 are inferred to be equalto pic_beta_offset_div2 and pic_tc_offset_div2, respectively.

Hereinafter, information related to subpictures, information related tovirtual boundaries usable in in-loop filtering, and signaling thereofwill be described.

When there is no subpicture having boundaries treated like pictureboundaries even if a picture includes several subpictures, an advantageof using the subpicture cannot be utilized. In an embodiment of thisdocument, image/video information for image coding may includeinformation for treating a subpicture as a picture, which may bereferred to as a picture handling flag (i.e.,subpic_treated_as_pic_flag[i]).

In order to signal a layout of the subpicture, a flag (i.e.,sub_pic_present_flag) related to whether subpictures are present issignaled. This may be referred to as a subpicture present flag. When avalue of sub_pic_present_flag is 1, information (i.e.,sps_num_subpics_minus1) related to the number of subpictures forpartitioning the picture is signaled. In an example, the number ofsubpictures for partitioning the picture may be equal tosps_num_subpics_minus1+1 (1 is added to sps_num_subpics_minus1).Available values of sps_num_subpics_minus1 include 0, which means thatonly one subpicture may be present in the picture. If the pictureincludes only one subpicture, signaling of subpicture-relatedinformation may be regarded as a redundant process since the subpictureitself is a picture.

In the existing embodiment, if the picture includes only one subpictureand subpicture signaling is present, a value of the picture handlingflag (i.e., subpic_treated aspic flag[i]) and/or a value of a flag(i.e., loop_filter_across_subpic_enabled_flag) related to whether loopfiltering is performed across subpictures may be 0 or 1. Herein, thereis a problem in that a case where the value of subpic_treated aspicflag[i] is 0 is inconsistent with a case where subpicture boundaries arepicture boundaries. This requires an additional redundant process inwhich a decoder is allowed to confirm that the picture boundaries arethe subpicture boundaries.

When a picture is generated based on a merging process of two or moresubpictures, all subpictures used in the merging process shall beindependently coded subpictures (a subpicture in which the value of thepicture handling flag (subpic_treated_as_pic_flag[i]) is 1). This isbecause, when a subpicture (referred to as a ‘first subpicture’ in thisparagraph) other than the independently coded subpicture is merged,blocks in the first subpicture are coded by referring to a referenceblock existing outside the first subpicture, which may cause a problemafter the merging.

In addition, when the picture is partitioned into subpictures,subpicture ID signaling may be present or may not be present. When thesubpicture ID signaling is present, the subpicture ID signaling may bepresent (included) in an SPS, a PPS, and/or a picture header (PH). Acase where the subpicture ID signaling is not present in the SPS mayinclude a case where a bitstream is generated as a result of asubpicture merging process. Accordingly, it is preferable that allsubpictures are independently coded when the subpicture ID signaling isnot included in the SPS.

In an image coding process in which virtual boundaries are used,information on positions of the virtual boundaries may be signaled in anSPS or a picture header. The signaling of the information on thepositions of the virtual boundaries in the SPS means that there is nochange in the positions in the entire CLVS. However, when referencepicture resampling (RPR) is enabled for the CLVS, pictures in the CLVSmay have different sizes. Herein, the RPR (also referred to as adaptiveresolution change (ARC)) is performed for a normal coding operation ofpictures having different resolutions (spatial resolutions). Forexample, the RPR may include up-sampling and down-sampling. High codingefficiency for adaptation of a bitrate and spatial resolution may beachieved through the RPR. There is a need to ensure that all of thepositions of the virtual boundaries are present in one picture, byconsidering the RPR.

In the existing ALF process, the k-order exponential Golomb code withk=3 is used to signal absolute values of luma and chroma ALFcoefficients. However, the k-order exponential Golomb coding isproblematic because it causes significant computational overhead andcomplexity.

Embodiments described hereinafter may propose solutions for theaforementioned problem. The embodiments may be applied independently.Alternatively, at least two embodiments may be applied in combination.

In an embodiment of this document, when subpicture signaling is presentand a picture has only one subpicture, the only one subpicture is anindependently coded subpicture. For example, when the picture has onlyone subpicture, the only one subpicture is an independently codedsubpicture, and a value of a picture handling flag (i.e.,subpic_treated_as_pic_flag[i]) for the only one subpicture is 1.Accordingly, a redundant process related to the subpicture may beomitted.

In an embodiment of this document, when subpicture signaling is present,the number of subpictures may be greater than 1. In an example, ifsubpicture signaling is present (i.e., a value of sub_pics_present_flagis 1), information on the number of subpictures (i.e.,sps_num_subpics_minus1) may be greater than 0, and the number ofsubpictures may be sps_num_subpics_minus1+1 (1 is added tosps_num_subpics_minus1). In another example, the information on thenumber of subpictures may be sps_num_subpics_minus2, and the number ofsubpictures may be sps_num_subpics_minus2+2 (2 is added tosps_num_subpics_minus2). In another example, a subpicture present flag(sub_pics_present_flag) may be replaced with information on the numberof subpictures (sps_num_subpics_minus1), and thus subpicture signalingmay be present when sps_num_subpics_minus1 is greater than 0.

In an embodiment of this document, when a picture is partitioned intosubpictures, at least one subpicture among the subpictures may be anindependently coded subpicture. Herein, a value of a picture handlingflag (i.e., subpic_treated_as_pic_flag[i]) for the independently codedsubpicture may be 1.

In an embodiment of this document, subpictures of a picture based on amerging process of two or more subpictures may be independently codedsubpictures.

In an embodiment of this document, when subpicture identification (ID)signaling is present at a position other than an SPS (other syntax,other high-level syntax information), all subpictures may beindependently coded subpictures, and a value of a picture handling flag(i.e., subpic_treated_as_pic_flag) for all subpictures may be 1. In anexample, the subpicture ID signaling may be present in a PPS, and inthis case, all subpictures may be independently coded subpictures. Inanother example, the subpicture ID signaling may be present in a pictureheader, and in this case, all subpictures are independently codedsubpictures.

In an embodiment of this document, when virtual boundary signaling ispresent in an SPS for CLVS and reference picture resampling is enabled,all horizontal virtual boundary positions may be within a minimumpicture height of pictures referring to the SPS, and all verticalvirtual boundary positions may be within a minimum picture width ofpictures referring to the SPS.

In an embodiment of this document, when reference picture resampling(RPR) is enabled, virtual boundary signaling may be included in apicture header. That is, when the RPR is enabled, the virtual boundarysignaling may not be included in the SPS.

In an embodiment of this document, fixed length coding (FLC) with thenumber of bits (or bit length) may be used to signal ALF data. In anexample, information on the ALF data may include information on a bitlength of an absolute value of an ALF luma coefficient (i.e.,alf_luma_coeff_abs_len_minus1) and/or information on a bit length of anabsolute value of an ALF chroma coefficient (i.e.,alf_chroma_coeff_abs_len_minus1). For example, the information on thebit length of the absolute value of the ALF luma coefficient and/or theinformation on the bit length of the absolute value of the ALF chromacoefficient may be ue(v) coded.

The following table shows an exemplary syntax of the SPS according tothe present embodiment.

TABLE 9 Descriptor seq_parameter_set_rbsp( ) {  ... subpics_present_flag u(1)  if( subpics_present_flag ) {  sps_num_subpics_minus2 u(8)   for( i = 0; i <= sps_num_  subpics_minus2 + 1; i++ ) {    subpic_ctu_top_left_x[ i ] u(v)   subpic_ctu_top_left_y[ i ] u(v)    subpic_width_minus1[ i ] u(v)   subpic_height_minus1[ i ] u(v)    subpic_treated_as_pic_flag[ i ]u(1)    loop_filter_across_ u(1)    subpic_enabled_flag[ i ]   }  } sps_subpic_id_present_flag u(1)  if( sps_subpics_id_present_flag ) {  sps_subpic_id_signalling_present_flag u(1)   if( sps_subpics_id_  signalling_present_flag ) {    sps_subpic_id_len_minus1 ue(v)    for(i = 0; i <= sps_num_    subpics_minus1; i++ )     sps_subpic_id[ i ]u(v)   }  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 10 sps_num_subpics_minus2 plus 2 specifies the number ofsubpictures. sps_num_subpics_minus2 shall be in the range of 0 to 253.When not present, the value of sps_num_subpics_minus1 is inferred to beequal to 1. ... subpic_treated_as_pic_flag[ i ] equal to 1 specifiesthat the i-th subpicture of each coded picture in the CLVS is treated asa picture in the decoding process excluding in-loop filteringoperations. subpic_treated_as_pic_flag[ i ] equal to 0 specifies thatthe i-th subpicture of each coded picture in the CLVS is not treated asa picture in the decoding process excluding in-loop filteringoperations. When not present, the value of subpic_treated_as_pic_flag[ i] is inferred to be equal to 0. It is a bistream conformance constraintthat there shall be at least one value of subpic_treated_as_pic_flag[ i] be equal to 1. ... It is a bistream conformance constraint that whensps_subpic_id_present_flag is equal to 1 andsps_subpic_id_signalling_present_flag is equal to 0, the value ofsubpic_treated_as_pic_flag[ i ] for all subpictures shall be equal to 1.

The following table shows an exemplary syntax of the SPS according tothe present embodiment.

TABLE 11 Descriptor seq_parameter_set_rbsp( ) {  ... ref_pic_resampling_enabled_flag u(1)  ... sps_loop_filter_across_virtual_ u(1)  boundaries_disabled_present_flag if( sps_loop_filter_across_virtual_  boundaries_disabled_present_flag ){   sps_num_ver_virtual_boundaries u(2)   for( i = 0; i < sps_num_ver_  virtual_boundaries; i++ )    sps_virtual_boundaries_pos_x[ i ] u(13)  sps_num_hor_virtual_boundaries u(2)   for( i = 0; i < sps_num_  hor_virtual_boundaries; i++ )    sps_virtual_boundaries_pos_y[ i ]u(13)  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 12 sps_num_ver_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_x[ i ] syntax elements that are present inthe SPS. When sps_num_ver_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.The value of sps_virtual_boundaries_pos_x[ 1 ] shall be in the range of1 to Ceil(pic_width_max_in_luma_samples ÷ 8 ) − 1, inclusive. LetminPicWidthInCLVS be the smallest value of pic_width_in_luma_samples inPPSs referring to the SPS, it is a bistream conformance constraint thatthe value of sps_virtual_boundaries_pos_x[ i ] for i in the range from 0to sps_num_ver_virtual_boundaries − 1, inclusive, is less than or equalto Ceil( minPicWidthInCLVS ÷ 8 ) − 1. sps_num_hor_virtual_boundariesspecifies the number of sps_virtual_boundaries_pos_y[ i ] syntaxelements that are present in the SPS. Whensps_num_hor_virtual_boundaries is not present, it is inferred to beequal to 0. sps_virtual_boundaries_pos_y[ i ] is used to compute thevalue of VirtualBoundariesPosY[ i ], which specifies the location of thei-th horizontal virtual boundary in units of luma samples. The value ofsps_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_max_in_luma_samples ÷ 8 ) − 1, inclusive. LetminPicHeightInCLVS be the smallest value of pic_height_in_luma_samplesin PPSs referring to the SPS, it is a bistream conformance constraintthat the value of sps_virtual_boundaries_pos_y[ i ] for i in the rangefrom 0 to sps_num_hor_virtual_boundaries − 1, inclusive, is less than orequal to Ceil( minPicHeightInCLVS ÷ 8 ) − 1. ...

The following table shows an exemplary syntax of ALF data according tothe present embodiment.

TABLE 13 Descriptor alf_data( ) {  alf_luma_filter_signal_flag u(1) alf_chroma_filter_signal_flag u(1)  if( alf_luma_filter_signal_flag ) {  alf_luma_clip_flag u(1)   alf_luma_num_filters_signalled_minus1 ue(v)  if( alf_luma_num_filters_   signalled_minus1 > 0 )    for( filtIdx =0; filtIdx <    NumAlfFilters; filtIdx++ )     alf_luma_coeff_delta_idx[filtIdx ] u(v)   for( sfIdx = 0; sfIdx <= alf_luma_  num_filters_signalled_   minus1; sfIdx++ )    alf_luma_coeff_abs_ue(v)    len_minus1[ sfIdx ]    for( j = 0; j < 12; j++ ) {    alf_luma_coeff_abs[ sfIdx ][ j ] u(v)     if( alf_luma_coeff_abs    [ sfIdx ][ j ] )      alf_luma_coeff_sign[ sfIdx ][ j ] u(1)    }  if( alf_luma_clip_flag )    for( sfIdx = 0; sfIdx <=   alf_luma_num_filters_    signalled_minus1; sfIdx++ )     for( j = 0;j < 12; j++ )      alf_luma_clip_idx[ sfIdx ][ j ] u(2)  }  if(alf_chroma_filter_signal_flag ) {   alf_chroma_num_alt_filters_minus1ue(v)   for( altIdx = 0; altIdx <= alf_chroma_   num_alt_filters_minus1;altIdx++ ) {    alf_chroma_clip_flag[ altIdx ] u(1)   alf_chroma_coeff_abs_ ue(v)    len_minus1[ altIdx ]    for( j = 0; j< 6; j++ ) {     alf_chroma_coeff_abs[ altIdx ][ j ] u(v)     if(alf_chroma_coeff_     abs[ altIdx ][ j ] > 0 )      alf_chroma_coeff_u(1)      sign[ altIdx ][ j ]    }    if( alf_chroma_clip_flag[ altIdx ])     for( j = 0; j < 6; j++ )      alf_chroma_clip_idx[ altIdx ][ j ]u(2)   }  } }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 14 alf_luma_coeff_abs_len_minus1[ sfIdx ] plus 1 specifies thenumber of bits used to represent the syntax element alf_luma_coeff_abs[sfIdx ][ j ]. The value of alf_luma_abs_len_minus1 shall be in the rangeof 0 to 15, inclusive. alf_luma_coeff_abs[ sfIdx ][ j ] specifies theabsolute value of the j-th coefficient of the signalled luma filterindicated by sfIdx. When alf_luma_coeff_abs[ sfIdx ][ j ] is notpresent, it is inferred to be equal 0. alf_chroma_coeff_abs_len_minus1[altIdx ] plus 1 specifies the number of bits used to represent thesyntax element alf_chroma_coeff_abs[ altIdx ][ j ]. The value ofalf_chroma_abs_len_minus1 shall be in the range of 0 to 15, inclusive.alf_chroma_coeff_abs[ altIdx ][ j ] specifics the absolute value of thej-th chroma filter coefficient for the alternative chroma filter withindex altIdx. When alf_chroma_coeff_abs[ altIdx ][ j ] is not present,it is inferred to be equal 0.

According to embodiments of the present document described together withthe above tables, through image coding based on subpictures and/orvirtual boundaries, subjective/objective image quality may be improved,and there may be a decrease in a hardware resource consumption requiredfor coding.

FIG. 7 and FIG. 8 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

The method disclosed in FIG. 7 may be performed by the encodingapparatus disclosed in FIG. 2 or FIG. 8 . Specifically, for example,S700 and S730 of FIG. 7 may be performed by a predictor 220 of theencoding apparatus of FIGS. 8 , S710 and S720 of FIG. 7 may be performedby a residual processor 230 of the encoding apparatus of FIG. 8 , S740of FIG. 7 may be performed by a filter 260 of the encoding apparatus ofFIG. 8 , and S750 of FIG. 7 may be performed by an entropy encoder 240of the encoding apparatus of FIG. 8 . In addition, although not shown inFIG. 7 , prediction samples or prediction-related information may bederived by the predictor 220 of the encoding apparatus of FIG. 7 , and abitstream may be generated from residual information orprediction-related information by the entropy encoder 240 of theencoding apparatus. The method disclosed in FIG. 7 may include theaforementioned embodiments in the present document.

Referring to FIG. 7 , the encoding apparatus may derive at least onereference picture (S700). The encoding apparatus may perform aprediction process, based on the at least one reference picture.Specifically, the encoding apparatus may derive the prediction samplesof the current blocks, based on a prediction mode. In this case, variousprediction methods disclosed in the present document, such as interprediction or intra prediction, may be applied. The encoding apparatusmay generate prediction samples for the current block in the currentpicture, based on the prediction process. For example, the encodingapparatus may perform an inter prediction process, based on the at leastone reference picture, and may generate prediction samples, based on theinter prediction process.

The encoding apparatus may generate/derive residual samples (S710). Theencoding apparatus may derive residual samples for a current block, andthe residual samples for the current block may be derived based onoriginal samples and prediction samples of the current block.Specifically, the encoding apparatus may generate the residual samples,based on the at least one reference picture of the step S700. Forexample, the encoding apparatus may generate the prediction samples forthe current block, based on the at least one reference picture, and maygenerate the residual samples, based on the prediction samples.

The encoding apparatus may derive transform coefficients. The encodingapparatus may derive the transform coefficients, based on a transformprocess for the residual samples. For example, the transform process mayinclude at least one of a discrete cosine transform (DCT), a discretesine transform (DST), a graph-based transform (GBT), and a conditionallynon-linear transform (CNT).

The encoding apparatus may derive quantized transform coefficients. Theencoding apparatus may derive the quantized transform coefficients,based on a quantization process for the transform coefficients. Thequantized transform coefficients may have a 1-dimensional vector form,based on a coefficient scan order.

The encoding apparatus may generate residual information (S720). Theencoding apparatus may generate the residual information, based on thetransform coefficients. The encoding apparatus may generate residualinformation indicating the quantized transform coefficients. Theresidual information may be generated through various encoding methodssuch as exponential Golomb, CAVLC, CABAC, or the like.

The encoding apparatus may generate reconstructed samples. The encodingapparatus may generate the reconstructed samples, based on the residualinformation. The reconstructed samples may be generated by adding theprediction sample and the residual samples based on the residualinformation. Specifically, the encoding apparatus may perform prediction(intra or inter prediction) on the current block, and may generatereconstructed samples, based on original samples and the predictionsamples generated from the prediction.

The reconstructed samples may include reconstructed luma samples andreconstructed chroma samples. Specifically, the residual samples mayinclude residual luma samples and residual chroma samples. The residualluma samples may be generated based on original luma samples andprediction luma samples. The residual chroma samples may be generatedbased on the original chroma samples and the prediction chroma samples.The encoding apparatus may derive transform coefficients for theresidual luma samples (luma transform coefficients) and/or transformcoefficients for the residual chroma samples (chroma transformcoefficients). Quantized transform coefficients may include quantizedluma transform coefficients and/or quantized chroma transformcoefficients.

The encoding apparatus may generate reference picture-relatedinformation (S730). The encoding apparatus may generate the referencepicture-related information, based on the at least one referencepicture. The reference picture-related information may be used for interprediction by the decoding apparatus.

The encoding apparatus may generate information related to in-loopfiltering for the reconstructed samples (S740). The encoding apparatusmay perform an in-loop filtering process on the reconstructed samples,and may generate information related to the in-loop filtering, based onthe in-loop filtering process. For example, the information related tothe in-loop filtering may include the aforementioned information onvirtual boundaries (the SPS virtual boundaries enabled flag, the pictureheader virtual boundaries enabled flag, the SPS virtual boundariespresent flag, the picture header virtual boundaries present flag,information on positions of virtual boundaries, etc.).

The encoding apparatus may encode video/image information (S750). Theimage information may include residual information, prediction-relatedinformation, reference picture-related information, virtualboundaries-related information (and/or additional virtualboundaries-related information), and/or in-loop filtering-relatedinformation. The encoded video/image information may be output in theform of a bitstream. The bitstream may be transmitted to a decodingapparatus through a network or a storage medium.

The image/video information may include a variety of informationaccording to an embodiment of the present document. For example, theimage/video may include information disclosed in at least one of thetables 1 to 14 above.

In an embodiment, the image information may include a sequence parameterset (SPS). For example, whether the SPS includes additional virtualboundaries-related information may be determined based on whetherresampling for the at least one reference picture is enabled. Herein,resampling for at least one reference picture may be performed accordingto the aforementioned reference picture resampling (RPR). The additionalvirtual boundaries-related information may also be simply referred to asvirtual boundaries-related information. The term ‘additional’ is used tobe distinguished from virtual boundaries-related information such as anSPS virtual boundaries present flag and/or a PH virtual boundariespresent flag.

In an embodiment, the additional virtual boundaries-related informationmay include the number of virtual boundaries and positions of thevirtual boundaries.

In an embodiment, the additional virtual boundaries-related informationmay include information on the number of vertical virtual boundaries,information on positions of the vertical virtual boundaries, informationon the number of horizontal virtual boundaries, and information onpositions of the horizontal virtual boundaries.

In an embodiment, the image information may include a reference pictureresampling enabled flag. For example, whether resampling for the atleast one reference picture is enabled may be determined based on thereference picture resampling enabled flag.

In an embodiment, the SPS may include an SPS virtual boundaries presentflag related to whether the SPS includes the additional virtualboundaries-related information. A value of the SPS virtual boundariespresent flag may be determined to be 0, based on that resampling for theat least one reference picture is enabled.

In an embodiment, the additional virtual boundaries-related informationmay be not included in the SPS, based on that resampling for the atleast one reference picture is enabled. The image information mayinclude picture header information. In addition, the picture headerinformation may include the additional virtual boundaries-relatedinformation.

In an embodiment, the current picture may include a subpicture as onlyone subpicture. The subpicture may be independently coded. Thereconstructed samples may be generated based on the subpicture.Subpicture-related information may be generated based on the subpicture.The image information may include the subpicture-related information.

In an embodiment, a subpicture_treated_as_picture_flag may be notpresent in the image information. Therefore, a value of thesubpicture_treated_as_picture_flag may be set through inference(estimation or prediction) at a decoding end. In an example, the valueof the subpicture_treated_as_picture_flag may be set to 1.

In an embodiment, the current picture may include subpictures. In anexample, the subpictures may be derived based on a merging process oftwo or more independently-coded-subpictures. The reconstructed samplesmay be generated based on the subpictures. Subpicture-relatedinformation may be generated based on the subpictures. In addition, theimage information may include the subpicture-related information.

FIG. 9 and FIG. 10 schematically show an example of a video/imagedecoding method and related components according to embodiment(s) of thepresent document.

The method disclosed in FIG. 9 may be performed by the decodingapparatus disclosed in FIG. 3 or FIG. 10 . Specifically, for example,S900 of FIG. 9 may be performed by an entropy decoder 310 of thedecoding apparatus, S910 of FIG. 9 may be performed by a predictor 310of the decoding apparatus, S920 may be performed by a residual processor320 and/or adder 340 of the decoding apparatus, and S930 may beperformed by a filter 350 of the decoding apparatus. The methoddisclosed in FIG. 9 may include the aforementioned embodiments in thepresent document.

Referring to FIG. 9 , the decoding apparatus may receive/obtainvideo/image information (S900). The video/image information may includeresidual information, prediction-related information, referencepicture-related information, virtual boundaries-related information(and/or additional virtual boundaries-related information), and/orin-loop filtering-related information. The decoding apparatus mayreceive/obtain the image/video information through a bitstream.

The image/video information may include a variety of informationaccording to an embodiment of the present document. For example, theimage/video may include information disclosed in at least one of thetables 1 to 14 above.

The decoding apparatus may derive quantized transform coefficients. Thedecoding apparatus may derive the quantized transform coefficients,based on the residual information. The quantized transform coefficientsmay have a 1-dimensional vector form, based on a coefficient scan order.Quantized transform coefficients may include quantized luma transformcoefficients and/or quantized chroma transform coefficients.

The decoding apparatus may derive the transform coefficients. Thedecoding apparatus may derive the transform coefficients, based on adequantization process for the quantized transform coefficients. Thedecoding apparatus may derive luma transform coefficients throughdequantization, based on the quantized luma transform coefficients. Thedecoding apparatus may derive chroma transform coefficients throughdequantization, based on the quantized chroma transform coefficients.

The decoding apparatus may generate/derive residual samples. Thedecoding apparatus may derive the residual samples, based on theinverse-transform process for the transform coefficients. The decodingapparatus may derive residual luma samples through the inverse-transformprocess, based on the luma transform coefficients. The decodingapparatus may derive residual chroma samples through theinverse-transform, based on the chroma transform coefficients.

The decoding apparatus may derive at least one reference picture, basedon reference picture-related information (S910). The decoding apparatusmay perform a prediction process, based on the at least one referencepicture. Specifically, the decoding apparatus may derive the predictionsamples of the current blocks, based on a prediction mode. In this case,various prediction methods disclosed in the present document, such asinter prediction or intra prediction, may be applied. The decodingapparatus may generate prediction samples for the current block in thecurrent picture, based on the prediction process. For example, thedecoding apparatus may perform an inter prediction process, based on theat least one reference picture, and may generate prediction samples,based on the inter prediction process.

The decoding apparatus may generate/derive reconstructed samples (S920).The decoding apparatus may generate reconstructed samples, based onprediction samples and residual samples. The decoding apparatus maygenerate reconstructed samples, based on a sum between the predictionsamples and original samples. For example, the decoding apparatus maygenerate/derive reconstructed luma samples and/or reconstructed chromasamples. The decoding apparatus may generate the reconstructed lumasamples and/or the reconstructed chroma samples, based on the residualinformation. The decoding apparatus may generate the reconstructedsamples, based on the residual information. The reconstructed samplesmay include the reconstructed luma samples and/or the reconstructedchroma samples. A luma component of the reconstructed samples maycorrespond to the reconstructed luma samples, and a chroma component ofthe reconstructed samples may correspond to the reconstructed chromasamples. The decoding apparatus may generate prediction luma samplesand/or prediction chroma samples through a prediction process. Thedecoding apparatus may generate the reconstructed luma samples, based onthe prediction luma samples and the residual luma samples. The decodingapparatus may generate the constructed chroma samples, based on theprediction chroma samples and the residual chroma samples.

The decoding apparatus may generate modified (filtered) reconstructedsamples (S930). The decoding apparatus may generate the modifiedreconstructed samples, based on an in-loop filtering process for thereconstructed samples. The decoding apparatus may generate the modifiedreconstructed samples, based on in-loop filtering-related information.The decoding apparatus may use a deblocking process, an SAO process,and/or an ALF process to generate the modified reconstructed samples.

In an embodiment, the image information may include an SPS. For example,whether the SPS includes additional virtual boundaries-relatedinformation may be determined based on whether resampling for the atleast one reference picture is enabled. Herein, resampling for at leastone reference picture may be performed according to the aforementionedRPR. The additional virtual boundaries-related information may also besimply referred to as virtual boundaries-related information. The term‘additional’ is used to be distinguished from virtual boundaries-relatedinformation such as an SPS virtual boundaries present flag and/or a PHvirtual boundaries present flag.

In an embodiment, the additional virtual boundaries-related informationmay include the number of virtual boundaries and positions of thevirtual boundaries.

In an embodiment, the additional virtual boundaries-related informationmay include information on the number of vertical virtual boundaries,information on positions of the vertical virtual boundaries, informationon the number of horizontal virtual boundaries, and information onpositions of the horizontal virtual boundaries.

In an embodiment, the image information may include a reference pictureresampling enabled flag. For example, whether resampling for the atleast one reference picture is enabled may be determined based on thereference picture resampling enabled flag.

In an embodiment, the SPS may include an SPS virtual boundaries presentflag related to whether the SPS includes the additional virtualboundaries-related information. A value of the SPS virtual boundariespresent flag may be determined to be 0, based on that resampling for theat least one reference picture is enabled.

In an embodiment, the additional virtual boundaries-related informationmay be not included in the SPS, based on that resampling for the atleast one reference picture is enabled. The image information mayinclude picture header information. In addition, the picture headerinformation may include the additional virtual boundaries-relatedinformation.

In an embodiment, the current picture may include a subpicture as onlyone subpicture. The subpicture may be independently coded. Thereconstructed samples may be generated based on the subpicture, andinformation related to the subpicture may be generated based on thesubpicture. In addition, the image information may include informationrelated to the subpicture.

In an embodiment, a picture handling flag for the subpicture (asubpicture_treated_as_picture_flag) may not be present in the imageinformation. Therefore, a value of subpicture_treated_as_picture_flagmay be set through inference (estimation or prediction) at a decodingend. In an example, the value of subpicture_treated_as_picture_flag maybe set to 1.

In an embodiment, the current picture may include subpictures. In anexample, the subpictures may be derived based on a merging process oftwo or more independently-coded-subpictures. The reconstructed samplesmay be generated based on the subpictures. Subpicture-relatedinformation may be generated based on the subpictures. In addition, theimage information may include the subpicture-related information.

In the presence of the residual sample for the current block, thedecoding apparatus may receive residual information for a current block.The residual information may include a transform coefficient forresidual samples. The decoding apparatus may derive residual samples (ora residual sample array) for the current block, based on the residualinformation. Specifically, the decoding apparatus may derive quantizedtransform coefficients, based on the residual information. The quantizedtransform coefficients may have a 1-dimensional vector form, based on acoefficient scan order. The decoding apparatus may derive the transformcoefficients, based on a dequantization process for the quantizedtransform coefficients. The decoding apparatus may derive residualsamples, based on the transform coefficients.

The decoding apparatus may generate reconstructed samples, based on(intra) prediction samples and residual samples, and may derive areconstructed block or reconstructed picture, based on the reconstructedsamples. Specifically, the decoding apparatus may include reconstructedsamples, based on a sum between the (intra) prediction samples and theresidual samples. Thereafter, as described above, the decoding apparatusmay optionally apply the in-loop filtering process such as thedeblocking filtering and/or the SAO process to the reconstructed pictureto improve subjective/objective image quality.

For example, the decoding apparatus may obtain image informationincluding all or parts of the above-described pieces of information (orsyntax elements) by decoding the bitstream or the encoded information.Further, the bitstream or the encoded information may be stored in acomputer readable storage medium, and may cause the above-describeddecoding method to be performed.

Although methods have been described on the basis of a flowchart inwhich steps or blocks are listed in sequence in the above-describedembodiments, the steps of the present document are not limited to acertain order, and a certain step may be performed in a different stepor in a different order or concurrently with respect to that describedabove. Further, it will be understood by those ordinary skilled in theart that the steps of the flowcharts are not exclusive, and another stepmay be included therein or one or more steps in the flowchart may bedeleted without exerting an influence on the scope of the presentdisclosure.

The aforementioned method according to the present disclosure may be inthe form of software, and the encoding apparatus and/or decodingapparatus according to the present disclosure may be included in adevice for performing image processing, for example, a TV, a computer, asmart phone, a set-top box, a display device, or the like.

When the embodiments of the present disclosure are implemented bysoftware, the aforementioned method may be implemented by a module(process or function) which performs the aforementioned function. Themodule may be stored in a memory and executed by a processor. The memorymay be installed inside or outside the processor and may be connected tothe processor via various well-known means. The processor may includeApplication-Specific Integrated Circuit (ASIC), other chipsets, alogical circuit, and/or a data processing device. The memory may includea Read-Only Memory (ROM), a Random Access Memory (RAM), a flash memory,a memory card, a storage medium, and/or other storage device. In otherwords, the embodiments according to the present disclosure may beimplemented and executed on a processor, a micro-processor, acontroller, or a chip. For example, functional units illustrated in therespective figures may be implemented and executed on a computer, aprocessor, a microprocessor, a controller, or a chip. In this case,information on implementation (for example, information on instructions)or algorithms may be stored in a digital storage medium.

In addition, the decoding apparatus and the encoding apparatus to whichthe embodiment(s) of the present document is applied may be included ina multimedia broadcasting transceiver, a mobile communication terminal,a home cinema video device, a digital cinema video device, asurveillance camera, a video chat device, and a real time communicationdevice such as video communication, a mobile streaming device, a storagemedium, a camcorder, a video on demand (VoD) service provider, an OverThe Top (OTT) video device, an internet streaming service provider, a 3Dvideo device, a Virtual Reality (VR) device, an Augment Reality (AR)device, an image telephone video device, a vehicle terminal (forexample, a vehicle (including an autonomous vehicle) terminal, anairplane terminal, or a ship terminal), and a medical video device; andmay be used to process an image signal or data. For example, the OTTvideo device may include a game console, a Bluray player, anInternet-connected TV, a home theater system, a smartphone, a tablet PC,and a Digital Video Recorder (DVR).

In addition, the processing method to which the embodiment(s) of thepresent document is applied may be produced in the form of a programexecuted by a computer and may be stored in a computer-readablerecording medium. Multimedia data having a data structure according tothe embodiment(s) of the present document may also be stored in thecomputer-readable recording medium. The computer readable recordingmedium includes all kinds of storage devices and distributed storagedevices in which computer readable data is stored. The computer-readablerecording medium may include, for example, a Bluray disc (BD), auniversal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, aCD-ROM, a magnetic tape, a floppy disk, and an optical data storagedevice. The computer-readable recording medium also includes mediaembodied in the form of a carrier wave (for example, transmission overthe Internet). In addition, a bitstream generated by the encoding methodmay be stored in the computer-readable recording medium or transmittedthrough a wired or wireless communication network.

In addition, the embodiment(s) of the present document may be embodiedas a computer program product based on a program code, and the programcode may be executed on a computer according to the embodiment(s) of thepresent document. The program code may be stored on a computer-readablecarrier.

FIG. 11 represents an example of a contents streaming system to whichthe embodiment of the present document may be applied.

Referring to FIG. 11 , the content streaming system to which theembodiments of the present document are applied may generally include anencoding server, a streaming server, a web server, a media storage, auser device, and a multimedia input device.

The encoding server functions to compress to digital data the contentsinput from the multimedia input devices, such as the smart phone, thecamera, the camcorder and the like, to generate a bitstream, and totransmit it to the streaming server. As another example, in a case wherethe multimedia input device, such as, the smart phone, the camera, thecamcorder or the like, directly generates a bitstream, the encodingserver may be omitted.

The bitstream may be generated by an encoding method or a bitstreamgeneration method to which the embodiments of the present document isapplied. And the streaming server may temporarily store the bitstream ina process of transmitting or receiving the bitstream.

The streaming server transmits multimedia data to the user equipment onthe basis of a user's request through the web server, which functions asan instrument that informs a user of what service there is. When theuser requests a service which the user wants, the web server transfersthe request to the streaming server, and the streaming server transmitsmultimedia data to the user. In this regard, the contents streamingsystem may include a separate control server, and in this case, thecontrol server functions to control commands/responses betweenrespective equipment in the content streaming system.

The streaming server may receive contents from the media storage and/orthe encoding server. For example, in a case the contents are receivedfrom the encoding server, the contents may be received in real time. Inthis case, the streaming server may store the bitstream for apredetermined period of time to provide the streaming service smoothly.

For example, the user equipment may include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a personaldigital assistant (PDA), a portable multimedia player (PMP), anavigation, a slate PC, a tablet PC, an ultrabook, a wearable device(e.g., a watch-type terminal (smart watch), a glass-type terminal (smartglass), a head mounted display (HMD)), a digital TV, a desktop computer,a digital signage or the like.

Each of servers in the contents streaming system may be operated as adistributed server, and in this case, data received by each server maybe processed in distributed manner.

Claims in the present description can be combined in a various way. Forexample, technical features in method claims of the present descriptioncan be combined to be implemented or performed in an apparatus, andtechnical features in apparatus claims can be combined to be implementedor performed in a method. Further, technical features in method claim(s)and apparatus claim(s) can be combined to be implemented or performed inan apparatus. Further, technical features in method claim(s) andapparatus claim(s) can be combined to be implemented or performed in amethod.

1-19. (canceled)
 20. A decoding apparatus for image decoding, thedecoding apparatus comprising: a memory; and at least one processorconnected to the memory, the at least one processor configured to:obtain image information including residual information and referencepicture-related information through a bitstream; derive at least onereference picture, based on the reference picture-related information;generate reconstructed samples of a current picture, based on theresidual information and the at least one reference picture; andgenerate modified reconstructed samples, based on an in-loop filteringprocess for the reconstructed samples, wherein the image informationincludes a sequence parameter set (SPS), wherein based on whetherresampling for the at least one reference picture is enabled, it isdetermined whether the SPS includes additional virtualboundaries-related information, wherein the SPS includes an SPS virtualboundaries present flag related to whether the SPS includes theadditional virtual boundaries-related information, and wherein based onthat the resampling for the at least one reference picture is enabled, avalue of the SPS virtual boundaries present flag is determined to be 0.21. An encoding apparatus for image encoding, the encoding apparatuscomprising: a memory; and at least one processor connected to thememory, the at least one processor configured to: generate residualsamples for a current block; generate residual information, based on theresidual samples for the current block; derive at least one referencepicture for reconstructed samples of a current picture; generatereference picture-related information, based on the at least onereference picture; generate in-loop filtering-related information forreconstructed samples of the current picture; and encode imageinformation including the residual information, the referencepicture-related information, and the in-loop filtering-relatedinformation, wherein the image information includes a sequence parameterset (SPS), wherein based on whether resampling for the at least onereference picture is enabled, it is determined whether the SPS includesadditional virtual boundaries-related information, wherein the SPSincludes an SPS virtual boundaries present flag related to whether theSPS includes the additional virtual boundaries-related information, andwherein based on that the resampling for the at least one referencepicture is enabled, a value of the SPS virtual boundaries present flagis determined to be
 0. 22. A non-transitory computer readable storagemedium storing a bitstream generated by the encoding apparatus for imageencoding of claim
 21. 23. An apparatus for transmitting data for animage, the apparatus comprising: at least one processor configured toobtain a bitstream for the image, wherein the bitstream is generatedbased on generating residual samples for a current block, generatingresidual information, based on the residual samples for the currentblock, deriving at least one reference picture for reconstructed samplesof a current picture, generating reference picture-related information,based on the at least one reference picture, generating in-loopfiltering-related information for reconstructed samples of the currentpicture, and encoding image information including the residualinformation, the reference picture-related information, and the in-loopfiltering-related information; and a transmitter configured to transmitthe data comprising the bitstream, wherein the image informationincludes a sequence parameter set (SPS), wherein based on whetherresampling for the at least one reference picture is enabled, it isdetermined whether the SPS includes additional virtualboundaries-related information, wherein the SPS includes an SPS virtualboundaries present flag related to whether the SPS includes theadditional virtual boundaries-related information, and wherein based onthat the resampling for the at least one reference picture is enabled, avalue of the SPS virtual boundaries present flag is determined to be 0.